By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,615 Members | 1,961 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,615 IT Pros & Developers. It's quick & easy.

Passing data from one form to another

P: 1
Hi everyone,
i have created a form in C# which i load from another form but also from my main menu.

whenever i load my form from form1 i would like to pass some parameters from form1 as well.

whenever i load it from my main i want the parameters fields empty.

Can anyone help me with this?
Thanx in advance!!
Efi
Apr 21 '07 #1
Share this Question
Share on Google+
2 Replies


SammyB
Expert 100+
P: 807
Hi everyone,
i have created a form in C# which i load from another form but also from my main menu.

whenever i load my form from form1 i would like to pass some parameters from form1 as well.

whenever i load it from my main i want the parameters fields empty.

Can anyone help me with this?
Thanx in advance!!
Efi
See my responses in http://www.thescripts.com/forum/thread614534.html. You should be able to use one of the early simple examples to solve your problem. HTH --Sam
Apr 23 '07 #2

P: 4
You can achieve it with following 3 ways

1. Through Form's constructor-
- you need to overload the constuctor for a form n pass the appropriate
values when u r creating d object for a form
2. Through properties
- define public properties for a form, SET it when u make d object n GET it
when u need in second form
3. Through Common Module
- You can make a common module dt inturn will be storing d values dt
have to be used inbetween forms.

hope it'll help you
Apr 23 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.