Thans friends.
"Morten Wennevik" <
[email protected]>, haber iletisinde sunlari
yazdi

pr6qsj5vjhntkfz@localhost...
Hi Arda,
If you want to implement a login feature ending up with a main form you
can try to use a showdialog on your loginform before starting the mainform.
For instance:
static void Main()
{
LoginForm login = new LoginForm();
if(login.ShowDialog() == DialogResult.OK)
{
Application.Run(new MainForm(login.UserName));
}
}
In your loginform you do the validation and store the user info in some
property (I used UserName in this example). If the validation is ok set
DialogResult for the LoginForm to OK or some value of choice and just
close it. You can then start the MainForm. If not validated, mainform
will never show.
There are other solution that might suit you better.
Happy coding!
Morten Wennevik [C# MVP]