|
-
Aug 16th, 2000, 07:34 AM
#1
I want to resize a VB forms width and height to the available Screen.
By available screen I mean the screen excluding the startbar and other toolbars.
I have managed to do this using an API:
Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" _
(ByVal uAction As Long, _
ByVal uParam As Long, _
lpvParam As Any, _
ByVal fuWinIni As Long) As Long
r = SystemParametersInfo(SPI_GETWORKAREA, 0&, rc, 0&)
AvailableLeft = rc.Left * Screen.TwipsPerPixelX
AvailableRight = rc.Right * Screen.TwipsPerPixelX
AvailableTop = rc.Top * Screen.TwipsPerPixelY
AvailableBottom = rc.Bottom * Screen.TwipsPerPixelY
Does any bright spark know how I can position the forms TOP and LEFT position to be within the available screen area?
So for example if I move my start bar to the top of the screen the form will be resized to the free space at the bottom of the screen and will be positioned below the start bar?
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
|