100% Noob question: how to dynamically resize the form?

10-11-2006, 12:58 PM
It's been a while since I've coded anything and I am working to improve an existing project. I would like the main window (form) of the application to change size based on user interaction...

First off... the program is a fixed window size. let's say 320x240... and when the user clicks on a button I want the window to resize to let's say 640x480.

i know this is a really stupid question and i should have been able to figure it out by now but I figured i could get input from others.

I tried:

If (user clicks on item) Then
Me.Size.Height = 480
Me.Size.Width = 640

with no luck as well as many other ways that i could think of.

any help would be greatly apreciated. :)

10-11-2006, 01:08 PM
Did you notice the squiggles under the code? VB is trying to tell you something. :)

Me.Height = 480
Me.Width = 640
Is probably what you want.


10-11-2006, 01:28 PM
i think i already tried that... but i will give it a shot as soon as i am back in front of my machine. i really hope that it is something that simple.

thanks again

10-11-2006, 03:54 PM
Awesome!!! It worked beautifully! And it was painless... Thanks dude!!

10-11-2006, 04:18 PM
*High Five* (Yep Racoons have five digits too.) :)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum