|
-
Jul 3rd, 2000, 10:53 AM
#1
Thread Starter
Member
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).
-
Jul 3rd, 2000, 11:17 AM
#2
Addicted Member
Erm... it's '0', isn't it?
Either that was really easy or I completely missed the point...
Visual Basic 6 Enterprise Edition + SP4
-
Jul 3rd, 2000, 11:36 AM
#3
Thread Starter
Member
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)
-
Jul 3rd, 2000, 02:28 PM
#4
Junior Member
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.
Life's hard, but the front of a train is harder 
-
Jul 3rd, 2000, 03:22 PM
#5
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
-
Jul 3rd, 2000, 03:32 PM
#6
transcendental analytic
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
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jul 5th, 2000, 01:56 AM
#7
Thread Starter
Member
t h a n k s a l o t ! ! ! ! ! ! ! ! ! ! ! ! ! !
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|