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 3: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 OriginalGriff 7,215
1 DamithSL 5,114
2 Maciej Los 4,866
3 Sergey Alexandrovich Kryukov 4,747
4 Kornfeld Eliyahu Peter 4,514


Advertise | Privacy | Mobile
Web01 | 2.8.141223.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