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

Home Posts Topics Members FAQ

Child Form variables postback to MDI Parent

hi everybody,

I let the user enter values in a Child Form.
How can I post those values back to the MDIParent Form (which uses these
values) ?

By the way, is it possible to access Public MDIParent variables in a Child
Form ??

Help appreciated,

Nov 16 '05 #1
4 2952
One way would be to use properties. Or you could use return types in your
methods.

It really depends on what you are trying to do.

Bob Calvanese

"Philippe" <Ph******@discussions.microsoft.com> wrote in message
news:D0**********************************@microsof t.com...
hi everybody,

I let the user enter values in a Child Form.
How can I post those values back to the MDIParent Form (which uses these
values) ?

By the way, is it possible to access Public MDIParent variables in a Child
Form ??

Help appreciated,

Nov 16 '05 #2
assuming you got 2 forms:
frmPost
frmInput (has public control "txtName" and "txtMail")
then in frmPost you can get value of "txtName"or"txtMail" by this:
private void btn_Click(object sender, System.EventArgs e)
{
frmInput myForm=new frmInput ();
myForm.ShowDialog(this);
this.user_name=myForm.txtName.Text;
this.user_mail=myForm.txtMail.Text;
}

"Philippe" <Ph******@discussions.microsoft.com> дÈëÏûÏ¢
news:D0**********************************@microsof t.com...
hi everybody,

I let the user enter values in a Child Form.
How can I post those values back to the MDIParent Form (which uses these
values) ?

By the way, is it possible to access Public MDIParent variables in a Child
Form ??

Help appreciated,

Nov 16 '05 #3
and if you want to access Public MDIParent variables in a Child Form,you
should declare a public static variable in MDIParent:
public static bool hasChild;
then you can access it from Child:
MDIParent.hasChild=true;

----- Original Message -----
From: "Philippe" <Ph******@discussions.microsoft.com>
Newsgroups: microsoft.public.dotnet.languages.csharp
Sent: Wednesday, March 16, 2005 7:57 AM
Subject: Child Form variables postback to MDI Parent

hi everybody,

I let the user enter values in a Child Form.
How can I post those values back to the MDIParent Form (which uses these
values) ?

By the way, is it possible to access Public MDIParent variables in a Child
Form ??

Help appreciated,

Nov 16 '05 #4
When working with objects you should not directly expose your member
variables. If that was not the case... Why not just make everything public?

--
Bob Calvanese
"Philippe" <Ph******@discussions.microsoft.com> wrote in message
news:D0**********************************@microsof t.com...
hi everybody,

I let the user enter values in a Child Form.
How can I post those values back to the MDIParent Form (which uses these
values) ?

By the way, is it possible to access Public MDIParent variables in a Child
Form ??

Help appreciated,

Nov 16 '05 #5

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

Similar topics

3
by: Isabel | last post by:
How can you close all child browser windows that where open by a parent browser window? I have links on a parent (main) page that opens the child page as a separate browser. However, I need to be...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
2
by: Paul | last post by:
Hi this is related to a previous post, hopefully just a bit clearer description o the problem. I have a parent form that opens a new form (child form) while still leaving the parent form open....
2
by: Jim Shank | last post by:
I am really trying to find the best OOP way of doing this. I have a parent MDI form with multiple children and I am trying to communicate variables between them. I have been able to successfully...
6
by: Edwinah63 | last post by:
Hi everyone, could someone give me some thoughts on the best way to manage mdi parent and child forms? in vb6 i could scroll through the forms collection and determine which forms were...
3
by: Maarten | last post by:
hi, how can i pass data from a parrentform to a childform and reverse or retreave data from a childform of the parentform and reverse. Regards Maarten
5
by: midnight_use_only | last post by:
hi all, quick question, how do you submit a form to a parent window from a child popup window? i have the following and all online documentation *suggests* that it should work but it does NOT: ...
3
by: fullmetal87 | last post by:
Hi I having a problem with calling the parent method from child form. I am working on an asp .net application. I place the code below under the hyplinkcontrol as the navigation url. And it do open...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
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...

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.