Page 1 of 1
System Taskbar
Posted: Wed Jan 26, 2011 6:03 pm
by chrisjx2002
Hello,
I use the System.DesktopWidth and System.DesktopHeight values to define the main window. But how is it possible to have the height of the system taskbar?
Regards
Re: System Taskbar
Posted: Wed Jan 26, 2011 6:55 pm
by gfilatov
chrisjx2002 wrote:Hello,
I use the System.DesktopWidth and System.DesktopHeight values to define the main window. But how is it possible to have the height of the system taskbar?
Hello,
It is possible with the following C-function:
Code: Select all
HB_FUNC ( GETTASKBARHEIGHT )
{
HWND hTaskBar;
RECT rc;
int nHeight;
hTaskBar = FindWindow( "Shell_TrayWnd", NULL );
GetWindowRect(hTaskBar, &rc);
nHeight = rc.bottom - rc.top;
hb_retni( nHeight );
}
Usage:
nTaskBarHeight := GetTaskBarHeight()
I hope that helps

Re: System Taskbar
Posted: Wed Jan 26, 2011 7:12 pm
by Rathinagiri
Thanks a lot Grigory. Really useful.
Re: System Taskbar
Posted: Thu Jan 27, 2011 5:11 am
by DenCo
I do the same as Chris on my main window setup, and too had wondered about the taskbar.
Thanks for this information.
Bill
Re: System Taskbar
Posted: Thu Jan 27, 2011 9:46 am
by chrisjx2002
Thanks a lot. It was exactly what I was looking for.
Best regards