home *** CD-ROM | disk | FTP | other *** search
-
- 'WINRECT.BAS - show how to get window position and size
- 'and demonstrate how to use the struct statement
-
- struct winRect, _
- orgX as uShort, _
- orgY as uShort, _
- cornerX as uShort, _
- cornerY as uShort
-
- open "test me" for window as #win
-
- open "user.dll" for dll as #user
-
- hndl = hwnd(#win)
-
- calldll #user, "GetWindowRect", _
- hndl as word, _
- winRect as struct, _
- result as void
-
- print "Upper Left corner of 'test me' is: "; winRect.orgX.struct; ", "; winRect.orgY.struct
- print "Lower Right corner of 'test me' is: "; winRect.cornerX.struct; ", "; winRect.cornerY.struct
-
- close #user
-
- input r$
-