10-01-2001, 07:04 AM
Does anybody know how to get the scalewidth and height of the crseen, or get the current height or width of the task bar and whether it is positioned at the side or top or bottom. My reasopn is that i want my form to be display above or next to the system clock on the task bar as if it were a status box. The box appears when the status messages are updated.
Also could someone please have a look at the most recent post i made in the Communications forum, i dont seem to be getting much response.
10-01-2001, 07:15 AM
interesting questions. i don't know if this is what you're looking for, but for screen dimensions you can say:
as far as the taskbar goes, i know you can use use some API(s) for that. look into the FindWindowEx function---and if you haven't already, goto www.allapi.net (http://www.allapi.net) and download APIguide 2001....it's essential
10-01-2001, 07:30 AM
Have a look at the code below. The rect that is returned is relative to the screen, so if for example the taskbar is at the top then r.top = 28. You can use this to determine where the taskbar is.
<pre>Private Const SPI_GETWORKAREA = 48
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, lpvParam As Any, ByVal fuWinIni As Long) As Long
Private Sub Form_Load()
Dim r As RECT
SystemParametersInfo SPI_GETWORKAREA, 0, r, 0