-
i need to know what is the top pixel of the desktop or actually, the work area of the desktop. i.e if i move the start taskbar to the top of the screen and even change it's size, i want to know where is the topest pixel of the work area zone (by area zone i mean the whole area which a window uses if i maximize the window).
-
Erm... it's '0', isn't it?
Either that was really easy or I completely missed the point...
-
i guess u missed the point
if i move the start taskbar or any other app to be docked at the top of the screen, i want to know their height.. (all together)
-
FindWindow API?
hmmz try the FindWindow API
I don't know exactly how it works.. but I think ya can accomplish what you want with that.
-
FindWindow will return the Handle of another Window. The first parameter is the type of Class (Pass 0 for any class) and the second parameter is the Window Title.
Code:
Private Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Long
Private Sub Command1_Click()
'Get the Handle of MyWindowTitle
GetHandle = FindWindow(CLng(0), "MyWindowTitle")
End Sub
-
I guess it's easy just to maximaze your window and store the values but otherways you could find out the position of the startmenu, well actually i haven't done it myself, never needed but i found out you can do it when i was making my own appbar:
Code:
Public Const ABM_GETTASKBARPOS = &H5
Public Declare Function SHAppBarMessage Lib "shell32.dll" (ByVal dwMessage As Long, pData As APPBARDATA) As Long
Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Type APPBARDATA
cbSize As Long
hwnd As Long
uCallbackMessage As Long
uEdge As Long
rc As RECT
lParam As Long ' message specific
End Type
-
t h a n k s a l o t ! ! ! ! ! ! ! ! ! ! ! ! ! !