data passing between windows forms

C

Cantekin Guneser

i am new to windows aplication, i am planning to desing a program which has
login form. i want to use in formation at second form which i used in login
form.

ex: i filled a dataset in login form how i can use this filled dataset in
the other forms, or i want to use user name in the second form which was
entered at login form
 
W

William Ryan

You can create properties of the forms and set them to the dataset or given
variable. Or you can create a class with static properties one of which is
your dataset. Then you can reference it from anywhere.

HTH,

Bill
 
B

Balasubramanian Ramanathan

Hi,
In the second form declare a property or field of type Form and assign the
login form to that variable and the show the second form...in the second
form you can access the login form and the controls in it.. Make sure that
the controls in the login form should have the access modifiers as internal
or public. If it is priave it wont be visible in the second form
Thanks
balu
 
C

Cantekin Guneser

can you explain more and send me example

William Ryan said:
You can create properties of the forms and set them to the dataset or given
variable. Or you can create a class with static properties one of which is
your dataset. Then you can reference it from anywhere.

HTH,

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top