Click to See Complete Forum and Search --> : Form resize
DugzDMan
Mar 15th, 2001, 11:55 AM
I have a program using MDI forms. When it starts up I would like the program to show the entire form (unless the user has their display settings way low :-). If I set it for 1024 x 768, it looks perfect. But, when viewed at 800 x 600, 1280 x 1024, etc. it looks horrible. Is there a way I can check the screen resolution of the computer it is running on and us a formula (or something) to set the size?
Thanks for all the help.
Doug
Why not just set the WindowState to maximized? This will it will cover the whole screen regardless of the size.
DugzDMan
Mar 15th, 2001, 12:08 PM
That is the way I originally had it, but when someone hits the restore"?" button. It isn't large enough to show the entire screen, depending on resolution. Much of the information input to the program is from other files (ie notes, excel, etc.) With the form set to the right size, most would be able to position both forms to be able to see the information and input it, without having to Alt-Tab between the progs.
Mostly, I think I would just like to know how to do this.
Thanks,
Doug
KrishnaSantosh
Mar 16th, 2001, 11:03 PM
Why Not Use A Function To Determine The Resolution Without APIs
Function IsResolution(Width As Integer, Height As Integer) As Boolean
If (Screen.Width / Screen.TwipsPerPixelX = Width) And (Screen.Height / Screen.TwipsPerPixelY = Height) Then
IsResolution = True
Else
IsResolution = False
End If
End Function
'For More Codes Like Changing Resolutions And
'Skinning EMail Me
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.