473,406 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Open and closing forms

106 100+
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 4481
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 100+
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 100+
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
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 100+
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.