Results 1 to 7 of 7

Thread: Desktop Top

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    55
    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).

  2. #2
    Addicted Member
    Join Date
    Apr 2000
    Location
    Sheffield, England.
    Posts
    136
    Erm... it's '0', isn't it?

    Either that was really easy or I completely missed the point...
    Visual Basic 6 Enterprise Edition + SP4

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    55
    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)

  4. #4
    Junior Member
    Join Date
    Apr 2000
    Posts
    27

    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

  5. #5
    Guest
    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

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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.

  7. #7

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    55
    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
  •  



Click Here to Expand Forum to Full Width