المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : how to cancel eventArgs



C# Programming
10-12-2009, 11:30 PM
i have the following code
this code runs on LogIn form Acts as standby while other forms still opened

if(Application.OpenForms["MainForm"].MdiChildren.Length>0)
{
MessageBox.Show("!..you should close all opened windows before continue", MessageBoxButtons.OK, MessageBoxIcon.Information);

}
else
{
Application.Exit();
}
when code running LogIn form disappeared and user can access any opened form

i want to only keep LogIn form running untill entering valid password