如何在关闭表单之前显示弹出消息 [英] how to show the pop up message before the closing the form

查看:53
本文介绍了如何在关闭表单之前显示弹出消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在关闭表单前显示弹出消息。



注意:这是winodws应用程序



i希望在使用c sharp关闭屏幕之前显示弹出消息。



我该怎么办?



请帮帮我。

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.

推荐答案

使用Form_closing [ ^ ]事件。


试试这个:



Try this:

public Form1()
{
    InitializeComponent();
    this.FormClosing += new FormClosingEventHandler(Form1_FormClosing);
}

void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
    //show pop-up
}


这篇关于如何在关闭表单之前显示弹出消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆