Eenlarge and back-to-original-size of a VB 6 form...

I have designed a small vb 6 form with bunch of buttons, drop boxes, etc tightly put together.  Is it possible to switch back and fort to a larger size form (with all controls enlarged proportionally) and back to its original size?

What is the code to do this?


LVL 34
Mike EghtebasDatabase and Application DeveloperAsked:
Who is Participating?
vinnyd79Connect With a Mentor Commented:
You can add this bas module to your project:

Then add this to each form you want to resize the controls on:

Private Sub Form_Resize()
ReSizeFormFor Me
End Sub
Mike EghtebasDatabase and Application DeveloperAuthor Commented:
Thank you.  It works grat except in one case where I am using small picture boxes as command button.  When the form is resized, the picture button changes in size but its bitmap picture attributes remain the same size.  I will look to see, at least, if I can get the bitmap images remain centered inside picture box.  Any comment in this regard would be appreciated.


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.