-
System Tray Area
I was looking for an API function by which I would get the location of the System Clock within the System Tray. Or for that matter, the position of any icon within the System Tray. Even if there is a way to get the System Tray's position itself, it might help. I can get the work area's width and height by the following code:
private Sub Command1_Click()
With SysInfo1
print "WorkAreaLeft: " & .WorkAreaLeft / Screen.TwipsPerPixelX
print "WorkAreaTop: " & .WorkAreaTop / Screen.TwipsPerPixelY
print "WorkAreaWidth: " & .WorkAreaWidth / Screen.TwipsPerPixelX
print "WorkAreaHeight: " & .WorkAreaHeight / Screen.TwipsPerPixelY
print "ScreenHeight: " & Screen.Height / Screen.TwipsPerPixelY
print "ScreenWidth: " & Screen.Width / Screen.TwipsPerPixelX
End With
End Sub
Any help would greatly be appreciated. Thanks in advance.
-
Re: System Tray Area
You can get the tray area by using the FindWindow API, I can't give you the code cause for some reason or another, I keep getting this message from PlanetSourceCode that I'm hitting the server to hard (something about 81 times per second, now try telling me IE doesn't send stuff it isn't supposed to :throwup ) and that I'm banned for 24 hours, but if you go there and search the VB section of the site using something like "tray", you should get back a program with the title "Place your form in the tray", which allows you to place a form (not an icon, an entire form) in the tray. This also uses code to get the position of the tray.
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
-
Re: System Tray Area
Thanks a lot for your help. I will try that.
-
Re: System Tray Area
Tom,
Tried searching P.S.C.com for the mentioned sample app to place a form in the system tray and could not find it. I got 8 hits using your search argument. Most but not all had to do with Icons in the system tray but nothing stuck out as being able to place a form.
????
John G
-
Re: System Tray Area
-
Re: System Tray Area