473,326 Members | 2,104 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,326 software developers and data experts.

How to hide a form temporarily when you open a 2nd form?

Hey guys,

I've got a MAIN form, which I have a series of navigational buttons on.
When I open a secondary form from that form, I'd like to be able to HIDE the
original form. The reason is, if the user wants to minimize the application
so that he / she can then do something else, I don't want them to immediately
see the original form.

On the other hand, when they exit from the 2nd form, I'd like for the
original form (the MAIN screen) to re-appear.

How can I do this?
Any ideas?
Thanks!
Jul 10 '08 #1
2 1912
You could put something like this in the event handler:
//assuming this is the main form
this.Hide();
newform.ShowDialog(this);
this.Show();
That would hide the form while the 2nd is show. However, passing the main
form as the owner of the dialog should keep it shown above it.

If you dont want the 2nd form to be model, you would need to handle the
OnClosed event to show the main form.

HTH
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Todd Jaspers" wrote:
Hey guys,

I've got a MAIN form, which I have a series of navigational buttons on.
When I open a secondary form from that form, I'd like to be able to HIDE the
original form. The reason is, if the user wants to minimize the application
so that he / she can then do something else, I don't want them to immediately
see the original form.

On the other hand, when they exit from the 2nd form, I'd like for the
original form (the MAIN screen) to re-appear.

How can I do this?
Any ideas?
Thanks!
Jul 11 '08 #2
OMG, you're so awesome. Thank you!!!

"Ciaran O''Donnell" wrote:
You could put something like this in the event handler:
//assuming this is the main form
this.Hide();
newform.ShowDialog(this);
this.Show();
That would hide the form while the 2nd is show. However, passing the main
form as the owner of the dialog should keep it shown above it.

If you dont want the 2nd form to be model, you would need to handle the
OnClosed event to show the main form.

HTH
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Todd Jaspers" wrote:
Hey guys,

I've got a MAIN form, which I have a series of navigational buttons on.
When I open a secondary form from that form, I'd like to be able to HIDE the
original form. The reason is, if the user wants to minimize the application
so that he / she can then do something else, I don't want them to immediately
see the original form.

On the other hand, when they exit from the 2nd form, I'd like for the
original form (the MAIN screen) to re-appear.

How can I do this?
Any ideas?
Thanks!
Jul 11 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
9
by: Mark | last post by:
Hi All, I am trying to use the function found on the MVP site http://www.mvps.org/access/api/api0019.htm to hide the Access window. I must be missing something as I keep getting an error message:...
7
by: FP | last post by:
I'm new to Java Script. I'm displaying comments people have made. Below each persons' comment I want to add 2 buttons "Reply" and "Amend". Clicking "Reply" would display an empty text field...
2
by: gene kelley | last post by:
I have a dialog form, frmDetails, that is opened from the main form: frmDetails.ShowDialog() The only way I have provided to close this dialog is via the "X" button. If frmDetails is just...
5
by: livefreeordie | last post by:
Hi, I'm part of a 5-person team that develops websites for our company. I need to use the ftp_* functions to find some files on another file server. I need to authenticate to the file server...
13
by: jeff | last post by:
I am attempting to be able to show and hide a form called viewAllForm. I declared an instance of the form in a module. Public viewAllForm As New frmViewAll However I keep getting runtime errors...
2
by: rynato | last post by:
I have a form which the user fills out to enter some data. If there already exists an uncompleted session - say, the user started entering some data but had to stop to do something else - the...
10
by: sara | last post by:
Hi - Is it possible to hide the detail section of a report at run time? I have a report that prints all details, with summary lines. The user would like the report ALSO with just summary lines....
1
by: Paul Brady | last post by:
First, apologies iif this is an old problem. I do read this group, but I may have missed it. When I open a form in A2K to put data into a record (or create a new record), all is well provided I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.