VB6 form display

Hello all

I was wondering if it is possible to auto size the Form display depending of my screen display.

Ex: If i open my form on a 1280 X 800 screen resolution, then the form will open full screen and everything inside the form will also re size.

If i open my form on a 800 X 600, again, the form will open full screen and everything inside the form will also re size.

Whats inside by form is Command button, label, textbox ect..

Is that possible?

Thanks again for your help.
LVL 11
Wilder1626Asked:
Who is Participating?
 
Martin LissConnect With a Mentor Older than dirtCommented:
I've attached a sample project. To make it open full screen just change the WindowState property. BTW the code in my project isn't perfect and it's possible that you might have problems with certain controls. Let me know if you do run into problems. BTW I think that there are commercial dlls(?) that will do it better.
Resize.zip
0
 
djon2003Commented:
Using Screen.Width and Screen.Height gives you the size of the screen.

From that, you can set you form size to these values and resize all your controls and reposition them.
0
 
Wilder1626Author Commented:
Thanks you all. This is perfect form me.
0
 
Martin LissOlder than dirtCommented:
You're welcome.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.