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

MDI Child form Question

Hi,

I have an MDI form with one child form (called firstform), which has a
button. The button creates a new instance of a form(called secondform) with
a button on it also, and this new form is also set to be an MDI child.

When the button on the first form is clicked, the second form is initialized
and called with secondform.show() method. At the same time, I want to hide
the firstform by using firstform.hide(). All this works fine. The problem I
am having is: When the second form button is clicked, I want to show back
the firstform. How do I get a handle of the instance of the first form so I
can use this?

Looking forward to any help/pointers.

Thanks!
Alij

Nov 20 '07 #1
1 1091
On Nov 20, 12:01 pm, "Alij" <aliasger.jaf...@gmail.comwrote:
Hi,

I have an MDI form with one child form (called firstform), which has a
button. The button creates a new instance of a form(called secondform) with
a button on it also, and this new form is also set to be an MDI child.

When the button on the first form is clicked, the second form is initialized
and called with secondform.show() method. At the same time, I want to hide
the firstform by using firstform.hide(). All this works fine. The problem I
am having is: When the second form button is clicked, I want to show back
the firstform. How do I get a handle of the instance of the first form so I
can use this?

Looking forward to any help/pointers.

Thanks!
Alij
Each MDI child form has a Parent property which is the child form's
parent.
Nov 20 '07 #2

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

Similar topics

13
by: Stuart McGraw | last post by:
I haven't been able to figure this out and would appreciate some help... I have two tables, both with autonumber primary keys, and linked in a conventional master-child relationship. I've...
1
by: Martin Douglas | last post by:
Hey guys, maybe someone can help me with some MDI issues I have. A co-worker asked me a very simple question, one that I blew off as trivial, and it has become a time-consuming issue. Simply...
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,...
5
by: Randy | last post by:
The following code, which runs when I click File->Save in my main form, finds my save button in my mdi child for just fine. The question is: how do I invoke the Save method in the child form? ...
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...
14
by: Simon Abolnar | last post by:
I would like to know how to open child form from dialog form. Thanks for help! Simon
4
by: Richard Lewis Haggard | last post by:
What is the mechanism by which a child window can notify its parent that it has been clicked on? -- Richard Lewis Haggard www.Haggard-And-Associates.com
3
by: zacks | last post by:
Forgive me if this has been already asked an answered, I did do a search both here and in VS2005 Help, but I can't find the answer to my question. I am developing an MDI application that is a...
6
by: =?Utf-8?B?QVRU?= | last post by:
Hi, My MDI (Parentform) form can have 2 two type of forms (Datagridform and graphicform). When users create a new form, they have to pick either child form. When those child forms are created...
2
by: Marina | last post by:
We have MDI WinForms C# .Net2 application. Parent form has MdiContainer=true; Children forms are created like this: Form child = new Form(); child.MdiParent = this; child.Show(); To...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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,...

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.