I build Log in window where user enter his usernmae and password
I still don"t want use SQL and any data keeper, it's only for two users
so I check the password and username if it' ok than user must press botton OK and load next window this step I can't over .
Are the any suggestions ???

Sergey

mmmm, just take a look

bool Validate(string username, string password)
{
//you're code
}
//button login event handler
void onClick_btnLogin(object sender, EventArgs e)
{
if(Validate(txtUserName.Text, txtPassword.Text))
{
Form2 form2 = new Form2().Show();
this.Hide(); //to hide login form
}
else
{
//invalid username or password
}
}

So you hard code your passwords and usernames into your program, this is not very a good idea.
>>and load next window this step I can't over
I think you mean you cannot switch between the login window and the next. Well close the login form and open the main form.
A way to do this is open both forms but call form.Hide() on the main form. Then switch between form.Show() and form.Hide().

thanks Ramy and ddanbe your both answer my question
Sergey

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.