473,473 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

MdiParent

Hi All

I have set a form as an mdicontainer which holds 5 other child forms .Every time I click the toolbar button to open a child form ,a new child form is instantiated.I would like to close the other child forms.Thank you all for your responses.Can anyone guide me in this area..
code snippet is as follows

if(e.Button.Text.Equals("Begin BuyBack ")

TMS_UniversalBuyingTool.frmBuyBack buyback=new frmBuyBack()
buyback.MdiParent=this
buyback.Show()
}
Nov 16 '05 #1
2 2954
foreach(Form form in this.MdiChildren)
{
form.Close();
}

"Venkatesh" <an*******@discussions.microsoft.com> wrote in message
news:62**********************************@microsof t.com...
Hi All:

I have set a form as an mdicontainer which holds 5 other child forms ..Every time I click the toolbar button to open a child form ,a new child
form is instantiated.I would like to close the other child forms.Thank you
all for your responses.Can anyone guide me in this area... code snippet is as follows:

if(e.Button.Text.Equals("Begin BuyBack "))
{
TMS_UniversalBuyingTool.frmBuyBack buyback=new frmBuyBack();
buyback.MdiParent=this;
buyback.Show();
}

Nov 16 '05 #2
Hi Andy

Thank you .The code snippet you posted did work

Thanks again
Venkatesh
Nov 16 '05 #3

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

Similar topics

1
by: yin heng | last post by:
I am using c#2005 Beta to write a Mdi form, but I can't find the MDI properties as: IsMdiChild or MdiParent. I am a beginner of c#, is it the difference between .net 2003 edition and 2005 beta?...
1
by: Dursun | last post by:
I need to call a subroutine (CreateNewDoc()) in FormA from within FormB based on the user action in FormB. Let FormA be an MDIForm and let FormB be its MDIChild form (during the creation of FormB,...
26
by: Paul Mars | last post by:
FormParent load opens FormChildA. FormChildA btn click opens FormChildB. (FormChildA and FormChildB are both children of FormParent) (FormChildA and FormChildB are different forms) Problem:...
4
by: Ben dotNet | last post by:
FormA is the mdiParent FormB is the child FormC is the Form that is used to open FormB How do I open FormB from FormC (that is not a child) so that it it's mdiParent is FormA? Thanks, --Ben
1
by: Roy | last post by:
Hi all, I'm opening a mdichild (Form2) within another mdichild (Form1). In Form1 I have: Form2.MdiParent = Me.MdiParent 'No problem here .... .... If Form2.ShowDialog = DialogResult.OK Then 'I...
6
by: Rob | last post by:
Hello, I can easily send data types from any MDI parent to an MDI Child window using something like MDIChild( i ).ChildSubroutine( i2 ), which would call the Public subroutine ChildSubroutine in...
1
by: PDP-8E | last post by:
I'm new to VB.Net 2003 - (2 weeks in) so this MAY be straightforward... (Things changed since Octal Assembler I see !!!) I'll try to lay this out in a way that makes sense I created a...
2
by: thorgal | last post by:
Hello Following problem occured: I have an MdiParent with a Listview. In that listview i have elements like (x1,x2,x3) When I click on x1 a subform (mdichild) opens and i can change the...
2
slashcanadian
by: slashcanadian | last post by:
Hi, I want to ask something about MDIParent and MDIChild. I have no problem by putting the Form inside MDIParent by giving the link in the MDIParent. My question is.. when I have a link to another...
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: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...
1
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.