Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with windows form

Status
Not open for further replies.

powerranger

Technical User
Feb 14, 2003
10
0
0
US
I have two forms - login and data forms. I would like to use the user id and password from the login form to do some processes on the data form. How I can achieve this. Some sample of codes will help. Thanks.
 
you could just store them in public static fields

public class MyForm : Forms
{
public static pwd = "MyPassword";
public static user = "MyUsername";

// some other code

}

and o the new form zou simply say:

string pwd = MyForm.pwd;
srring user = MyForm.user;

yrs
gashcud
 
Create a login object available globally and read the properties from this.

PS Passwords are normally write only.

Craig
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top