473,473 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Open and closing forms

106 New Member
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
5 4484
Andrew Thackray
76 New Member
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
tara99
106 New Member
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
tara99
106 New Member
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
76 New Member
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
tara99
106 New Member
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

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

Similar topics

2
by: lokee | last post by:
hello all.... i have one query.... can somebody please tell me advantages and disadvantages of making connection to sql server open at the start of application and closing it at the end of...
2
by: Julia Baresch | last post by:
Hi everyone, As some of you may know, we've been having trouble with an unrecognized database format error. Today I installed an unfinished project on the workstation of one of my users. ...
3
by: stumorgan | last post by:
There is probably an extremely simple answer to this question and I'm just being foolish. I have a main form (let's say FormMain) which opens other forms (let's say Form1, Form2). How do I keep...
2
by: John | last post by:
Hi I am opening a dialog using; frmdialog = New frmdialognew frmdialog.ShowDialog() Is there a way to see if this dialog is already open to avoid opening multiple instances of it?
3
by: Karan | last post by:
I am calling finalize when form2 loads and deactivates form1 which closes form1. However, same thing is not happening in form2 because finalize is already called. Does anybody has solution to it....
4
by: rdemyan | last post by:
I'm using code from the following web page to open the API Browse Folder dialog http://www.mvps.org/access/api/api0002.htm It all works fine. But if the dialog box is open and the user closes...
13
by: Academic | last post by:
I have a MDI form, sometimes child forms and sometimes forms that are neither If I close the app the child forms closing and closed event happens followed by the Mdi form receiving the...
19
by: =?Utf-8?B?R3JlZw==?= | last post by:
How can I tell via code if a Form is already open. Each time my forms load I have some initialization code that runs, but if the form is already open and hidden I don't want that initialization...
2
by: KA NMC | last post by:
Current application is built in VB.net 2005 what it does is open other small applications within the form. I'm not using mdi I probably should. Here is my problem The application load - main...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.