By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,953 Members | 1,143 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,953 IT Pros & Developers. It's quick & easy.

Open and closing forms

100+
P: 106
I have forms which changes it size when I open it, close it, go to another form via button from existing form and come back to it when i close the new open form.

I don't have any code behind loading form event.
I don't have any code for opening and closing form.

Can any one help what should I do?
And How?

Thanks
Oct 27 '06 #1
Share this Question
Share on Google+
5 Replies


Andrew Thackray
P: 76
I've had this problem too.

My solution was to create two global variables in a module

Global FormHeight
Global FormWidth


In the Forms load event insert the lines

Formheight = me.height
formwidth = me.width

In the forms open event insert the code

me.height = formheight
me.width = formwidth

This code gets the forms size when its first loaded and resets the forms size back to its original size each time you open it. You could also add variables for the forms top and left properties so you can place the form in the smae place each time it is openeed

If you want to get fancy use google to search for a form resizer. There are a couple of free VBA modules that will automatically scale all the forms controls when the form is resized. Thiese allow the user to resize the form to suit themselves.
Oct 27 '06 #2

100+
P: 106
I've had this problem too.

My solution was to create two global variables in a module

Global FormHeight
Global FormWidth


In the Forms load event insert the lines

Formheight = me.height
formwidth = me.width

In the forms open event insert the code

me.height = formheight
me.width = formwidth

This code gets the forms size when its first loaded and resets the forms size back to its original size each time you open it. You could also add variables for the forms top and left properties so you can place the form in the smae place each time it is openeed

If you want to get fancy use google to search for a form resizer. There are a couple of free VBA modules that will automatically scale all the forms controls when the form is resized. Thiese allow the user to resize the form to suit themselves.
Thankyou
I will try it now
Oct 27 '06 #3

100+
P: 106
I've had this problem too.

My solution was to create two global variables in a module

Global FormHeight
Global FormWidth


In the Forms load event insert the lines

Formheight = me.height
formwidth = me.width

In the forms open event insert the code

me.height = formheight
me.width = formwidth

This code gets the forms size when its first loaded and resets the forms size back to its original size each time you open it. You could also add variables for the forms top and left properties so you can place the form in the smae place each time it is openeed

If you want to get fancy use google to search for a form resizer. There are a couple of free VBA modules that will automatically scale all the forms controls when the form is resized. Thiese allow the user to resize the form to suit themselves.
Thanks
I tried it it complains about Height
the error says: "Method or data memeber not found"
should I use WindowHeight or insideheight instead

Please help
Oct 27 '06 #4

Andrew Thackray
P: 76
Use windowheight. This is the height of the form. Inside height is the height of the inside of the form subtracting the title bar and borders
Oct 27 '06 #5

100+
P: 106
Use windowheight. This is the height of the form. Inside height is the height of the inside of the form subtracting the title bar and borders
Can you tell me how can I open the form in it is full length at the start?

thanks
Oct 27 '06 #6

Post your reply

Sign in to post your reply or Sign up for a free account.