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

MDI: Show Child then show another Child

23
When my MDI app loads, it shows a child form centered. This form has buttons as choices. When a button is clicked, that form closes and another opens.

From the second window, if they click the X to close the window, I want to show the original form again. If they click a button on that second window, I do not want to show the original form.

I am lost how to accomplish this. How do I know when the X is clicked to close the window. Or can I disable it and provide my own close button?

Thanks in advance!

~ Lisa
Apr 9 '07 #1
5 2024
alan75
60
try this:

sub on_form_chlid2_closing
form_child1.MdiParent = mdiForm
form_child1.show()
end sub
Apr 9 '07 #2
LLM
23
What I am missing is how to reopen the 1st child when the 2nd child is closed. The 2nd child can close with a button call to a 3rd child. I want to reopen the 1st child when 2nd child is closed with the X at the top right.
Apr 9 '07 #3
alan75
60
it might work with a flag:


Dim UserCloseBtn as boolean
UserCloseBtn = False

sub on_form_chlid2_closing()
if UserCloseBtn then
form_child3.MdiParent = mdiForm
form_child3.show()
else
form_child1.MdiParent = mdiForm
form_child1.show()
end if
end sub

sub on User_Close_Btn_Click()
UserCloseBtn = True
me.close()
end sub
Apr 10 '07 #4
LLM
23
Thank you! I will try this!
Apr 11 '07 #5
LLM
23
Worked like a charm! Thank you so much!
Apr 11 '07 #6

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

Similar topics

8
by: CJack | last post by:
hy, I have an mdi application, i create a child form and I want to know when a button is pressed while that child form is loaded. I have this code: private void frmTestBaby_KeyUp(object sender,...
1
by: Jon Rea | last post by:
I have an MDI application that has multiple different "modular documents". Each document can own multiple MDI windows that are managaed by a manager class that uses the singleton pattern and holds...
4
by: John Tyce | last post by:
The problem that I am now having, involves refreshing controls. I have allot of text boxes, several combo boxes and grids. These controls are showing live data from an Oracle database. I have dates...
3
by: Maheshkumar.R | last post by:
Hi groups, How i can command over the MDI CHIlD forms created dynamically at runtime from PARENT. Let say, i have generated 5 mdichild forms, but i want to work with child form1 from MDI...
3
by: Lance | last post by:
I've noticed that controls that are contained in MDI child forms fail to raise MouseLeave events if the MDI child form's MdiParent property is set to Nothing (after it was set to an existing MDI...
10
by: Charles Law | last post by:
For some reason, when I click the X to close my MDI parent form, the action appears to be re-directed to one of the MDI child forms, and the parent remains open. I am then unable to close the...
0
by: Bruin | last post by:
Hi All, I'm having a problem with MDI child forms when the reference to the MDI Parent is set in a Control library. (Sorry for the long post) I have an control library assembly which holds all...
7
by: Siv | last post by:
Hi, I have an MDI application that uses a generic "ShowPage" routine in a module that is called when I want to display a child form. The basic idea is that in the module I have declared each form...
3
by: Simon Verona | last post by:
I have a parent form which contains a toolbar. The toolbar controls the loading and switching to of MDI child forms. The code for the toolbar click event and one of the subroutines that loads...
8
by: Tony K | last post by:
How do you maximize a child form when you show the child form. My resolution on my screen is 1440 x 900. My parent form maximizes just fine, but when I show a child form it doesn't maximize. It...
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
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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.