|
-
Sep 21st, 2006, 04:58 AM
#1
Thread Starter
Fanatic Member
[2005] communication between 2 childforms
Hello everyone...
I have already done a project in VS2005 using mdiparent form and mdi child forms.
Now,When I click the button of one child form,Ive made it open an instance of another form as child form under the same mdiparent.
But,now I want to access the controls of the 1st childform from the 2nd child form.
How do I do it?
Ive already seen ...
http://www.devcity.net/Articles/100/multipleforms2.aspx
but I do not find help on accessing controls of one mdichild form from another mdi child form when the instance name is not available to the form.
Please help me with this...
Thanks a lot,
Godwin
Help someone else with what someone helped you! 
-
Sep 21st, 2006, 05:00 AM
#2
Re: [2005] communication between 2 childforms
-
Sep 21st, 2006, 05:10 AM
#3
Thread Starter
Fanatic Member
Re: [2005] communication between 2 childforms
Hi Jm,Thanks..
I have seen the link on your signature.
Im trying to find to access the other child through the parent if thats the way.Is there some kind of casting that can be done? nevermind if thats on my part to find out..i am trying [ ]
Thanks
Godwin
Help someone else with what someone helped you! 
-
Sep 21st, 2006, 05:24 AM
#4
Thread Starter
Fanatic Member
Re: [2005] communication between 2 childforms
found some answer from the article here...i'll go through the source code and come back 
This article has only covered a sample cross-section of some of the ways you can open multiple forms. There are other techniques (MDI, 'Form within a form' and owned forms, for example) that haven't been included here. But hopefully there is enough information here for most purposes in the early days of your journey up that long and tiring .Net learning curve.
If you do want to see some working code for MDI or owned forms, then you can check out the attached solution. It includes all seven methods above, plus these two.
Godwin
Help someone else with what someone helped you! 
-
Sep 21st, 2006, 06:16 AM
#5
Thread Starter
Fanatic Member
Re: [2005] communication between 2 childforms
Its not there in his examples on how to control controls between 2 mdi child forms
Godwin
Help someone else with what someone helped you! 
-
Sep 21st, 2006, 06:24 AM
#6
Re: [2005] communication between 2 childforms
What's the difference? Two forms is two forms. One of the forms has to have a reference to the other in order to affect it. The parent is the link so it has to provide the reference, just like the mutual friend I mentioned has to provide the other party's phone number for me to call them. Once you've got that reference then it's just another object and you can treat it as such. Don't think of forms as any different to any other objects because they're not. If you want to affect an object you need a reference to it, plain and simple. If you don't have a reference to that object then it's got to come from some other object that does.
-
Sep 25th, 2006, 01:38 AM
#7
Thread Starter
Fanatic Member
Re: [2005] communication between 2 childforms
Hi Jm,
Really great explaination
Thanks so much..
got it :-)
Godwin
Help someone else with what someone helped you! 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|