data passing between windows forms

  • Thread starter Thread starter Cantekin Guneser
  • Start date Start date
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
 
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
 
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
 
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
 
Back
Top