Disable the Cross at the top right of a form?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mulm3h
    New Member
    • Jan 2007
    • 14

    Disable the Cross at the top right of a form?

    Hi

    Is there a way to disable the cross button at the top right of a form to stop users accidentally close the program with any confirmation msg given??
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Is this is windows or web application?

    Comment

    • Shanaj
      New Member
      • Jan 2007
      • 51

      #3
      Originally posted by Mulm3h
      Hi

      Is there a way to disable the cross button at the top right of a form to stop users accidentally close the program with any confirmation msg given??

      Select CLOSING event of window from property and write

      e.Cancel=true;


      eg:

      private void Form1_Closing(o bject sender, System.Componen tModel.CancelEv entArgs e)
      {
      e.Cancel=true;
      }

      THIS IS FOR WINDOWS APPLICATION

      TO EXIT YOU CAN USE A BUTTON AND WRITE

      Application.Exi t();

      TRY THIS

      Comment

      Working...