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

MdiParent to fire event on adding/removing a MdiChild

Hi,

I wounder if someone could help me here: app has an MdiParent form - i
need to get some notification in form of an event when any MdiChild
forms are added to/removed from MdiParent.MdiChildren collection. I have
no control over children forms so i peed the parent form to fire this
event.

I didn't find any events of Form that would handle that.
Any ideas would be highly appreciated!

Thank you,
MuZZy
Dec 15 '05 #1
3 3077
Hi MuZZy,

As far as I know, there is no event fired when you add a child form to an
MDI parent form. However, when you make a child form to be the MDIChild of
the parent form, you will always need to call childForm.MdiParent =
parentForm;

So in this case, you can do whatever after this line of code.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 15 '05 #2
Kevin Yu [MSFT] wrote:
Hi MuZZy,

As far as I know, there is no event fired when you add a child form to an
MDI parent form. However, when you make a child form to be the MDIChild of
the parent form, you will always need to call childForm.MdiParent =
parentForm;

So in this case, you can do whatever after this line of code.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."


Well, i actually found an answer for that: When you set the from as
MdiParent, it adds a MdiClient object to that form. This object is
responsible for managing Mdi Child forms and it has events
ControlAdded/ControlRemoved which fire whenever an MdiChild is added
to/removed from parent Form.MdiChildren collection

I tried and it works just fine

Andrey
Dec 15 '05 #3
Hi Andrey,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Dec 17 '05 #4

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

Similar topics

0
by: Duncan | last post by:
Dear friends, I have a MDIform in vb.net with some images and buttons on it. This works fine unless I open a MDIChild. The child is being displayed between the images and buttons and the parent...
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,...
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...
0
by: mabalsyed | last post by:
hai how to change the mdiparent label forecolor when close the mdichild from in vb.net2003
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
by: Thorgal | last post by:
Hello all I have 2 questions First: I'm trying to print a Listview from an mdichild but how can i address this listview. For example, FrmMain is my Main form. In this Main form I have...
3
by: Sarang | last post by:
Hi, I have this code that makes the form as an MDIChild: chartWindowController.GetForm().MdiParent = _expertTradeMainFrm; chartWindowController.GetForm().WindowState =FormWindowState.Normal;...
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...
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...
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...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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.