Form Closing

  • Thread starter Thread starter Travis
  • Start date Start date
T

Travis

In my program I call a small form to test for a username and password before
letting a user get into the database like this

public SQLForm()
{
InitializeComponent();
//Ask for Password Before Letting users into Database
//MODAL CALL cannot access Parent until closed
SecurityForm acFormHandle = new SecurityForm();
if (acFormHandle.ShowDialog (this) == DialogResult.Cancel)
return;
}

The only problem is that if they click the X in the top right it bypasses my
security form logon and starts the app. I even disbled the X control but
they can close it with the key combination ALT + F4. Help

How can I make sure they cannot do this???


Travis
(e-mail address removed)
 
Instead of just using return, why don't u exit the application using Application.Exit

HTH
fbhcah
 
Application.Exit does not close the calling form just the form I called to
ask user identities.
 
Back
Top