473,385 Members | 1,693 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,385 software developers and data experts.

MdiChild Forms in VB.Net

Working with VB.Net I'm using a MdiParent form, bringing a child form as
follows:

Dim frmMaintenance As New frmMaintenance

frmMaintenance.MdiParent = Me

' Display the child form.

frmMaintenance.Show()

Now the frmMaintenance shows up just fine but I'd like to close it and
return to the frmMain (the MdiParent). The code I'm doing it with is:

frmMaintenance.ActiveForm.Close()

That line I'm 99% sure is not proper. When my Close event is fired it runs
that line and the whole application closes. I have serveral references I've
looked at and none of them

reveal how to close the MdiChild, frmMaintenance, in the case and return to
my MdiParent, frmMain.

Anyone have some advice?

Thanks

Phil


Nov 20 '05 #1
1 1800
* "Deep Phee" <pt***@yahoo.com> scripsit:
Working with VB.Net I'm using a MdiParent form, bringing a child form as
follows:

Dim frmMaintenance As New frmMaintenance

frmMaintenance.MdiParent = Me

' Display the child form.

frmMaintenance.Show()

Now the frmMaintenance shows up just fine but I'd like to close it and
return to the frmMain (the MdiParent). The code I'm doing it with is:

frmMaintenance.ActiveForm.Close()

That line I'm 99% sure is not proper. When my Close event is fired it runs
that line and the whole application closes. I have serveral references I've
looked at and none of them

reveal how to close the MdiChild, frmMaintenance, in the case and return to
my MdiParent, frmMain.


In the child form:

\\\
Me.Close()
///

- or -

In the MDI container form:

\\\
Me.ActiveMdiChild.Close()
///

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #2

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

Similar topics

1
by: Bruce A. Wilkinson | last post by:
I developing an imaging application that allows the user the potential of having up to 8 MDIChild forms open at the same time. When using the WindowList menu to switch between forms the forms...
0
by: Supra | last post by:
i got mdichild working. i'm working on similar to mirc chat. when i joined channel #vb the first mdichild is on. then when i wanted to join another channel #visualbasic. then i got second mdichild...
1
by: Mickey Swanson | last post by:
I have a MDI app wich has several different forms I need to call a method on one MDIchild form from another child form. I have a MDI form called frmMDI. I have a mdichild form called frmMain....
6
by: Claus Holm | last post by:
I'm trying to enable a menuitem in the parent form from a mdichild. Rather than making the menuitems public, I'd go for a public method in the parent form to do the change, but when I call the...
2
by: SpotNet | last post by:
Hello NewsGroup, I have a MDIParent form with a docked left treeview control, a splitter control and a generic docked control on the right. Kind of looks like Windows Explorer, though it's...
7
by: VM | last post by:
Hi, Is it possible to open always only one instance of a MDIChild form? Say, if form A is already opened, just give it the focus. I tried declaring theMDIChild forms as private members of the...
1
by: LCAdeveloper | last post by:
Can anyone help me with this? I'm trying to get an MDIChild form to lookup the value of a control on another open MDIChild form, but can't seem to get the right syntax. Let's say the two child...
0
by: Supra | last post by:
i got mdichild working. i'm working on similar to mirc chat. when i joined channel #vb the first mdichild is on. then when i wanted to join another channel #visualbasic. then i got second mdichild...
1
by: stanciutheone | last post by:
hi my name is valentin and i started to programm in C# for 2 weeks using SharpDeveloper, My questions is how can i create child forms because now i'm using just parent forms like: void...
0
by: kardiss | last post by:
I am trying to add Meebo's "Pop-out" kinda feature to my application which when a button is pressed in a MdiChild form, it kicks that MdiChild form out of the MdiParent boundary and acts like a SDI...
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
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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...

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.