Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
how to show the pop up message before the closing the form.
 
Note:It is winodws application
 
i want to show the pop up message before closing the screen using c sharp.

for that how can i do?

please help me.
Posted 11-Feb-13 2:38am
Comments
Vani Kulkarni at 11-Feb-13 8:42am
   
Repost of here[^]
Edo Tzumer at 11-Feb-13 9:25am
   
Indeed...
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Use Form_closing[^] event.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Try this:
 
        public Form1()
        {
            InitializeComponent();
            this.FormClosing += new FormClosingEventHandler(Form1_FormClosing);
        }
 
        void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            //show pop-up
        }
 
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Dnyaneshwar@Pune 604
1 thatraja 370
2 OriginalGriff 319
3 Sergey Alexandrovich Kryukov 241
4 Gihan Liyanage 194
0 OriginalGriff 737
1 Dnyaneshwar@Pune 604
2 Kornfeld Eliyahu Peter 505
3 Sergey Alexandrovich Kryukov 372
4 thatraja 370


Advertise | Privacy | Mobile
Web04 | 2.8.140902.1 | Last Updated 11 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100