Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to add code to Cross(X) button on a form
#1
Hi everybody
I saw brandons tutorial of "How to create a software series"
I saw how you created Notepad
But when we close the notepad you created in your video
it unlike normal notepad don't ask for confirmation if we haven't saved the text .

So i wanna ask that "How to add code to cross(X) button on form so that when one clicks on it, it asks for Confirmation

Thanks in Advance!!!!!!!!!!
The Power to Believe in Yourself is the Power to change the Fate!
#2
You can use the FormClosing event.
My Blog | My Setup | My Videos | Have a wonderful day.
#3
Thanks
I got it!!!!!!!!!!!!!!!!!!!!!!!!
<!-- sBig Grin --><img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt="Big Grin" title="Very Happy" /><!-- sBig Grin -->
The Power to Believe in Yourself is the Power to change the Fate!
#4
Great job!

Consider this case... closed.

*Sunglasses!*
My Blog | My Setup | My Videos | Have a wonderful day.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Compiling Code On The Fly? zmanalpha 4 20,233 10-04-2012, 05:36 AM
Last Post: briankxc
  How to Make button performs keyboard Button Functions? Himansh 1 9,614 09-15-2012, 10:57 AM
Last Post: brandonio21
  HTML - Editor How to create "Preview in Webbrowser " Button Himansh 2 12,571 05-21-2012, 12:08 AM
Last Post: Himansh
  How to create a change password Button?? Himansh 8 29,658 04-05-2012, 11:54 AM
Last Post: brandonio21
  How to code a print Button? Himansh 1 9,865 04-01-2012, 01:16 PM
Last Post: brandonio21
  Help Creating a WPF User Form kismetgerald 2 11,191 01-10-2012, 10:38 PM
Last Post: kismetgerald
  vb.net code to read and convert color michaelfalade 1 9,437 06-30-2011, 10:52 AM
Last Post: brandonio21
  Exit code ? lvlasked 1 8,879 06-30-2011, 10:36 AM
Last Post: lvlasked

Forum Jump:


Users browsing this thread: 1 Guest(s)