有一种方法可以防止用户在他的过程中关闭7za.exe窗口?我需要显示文件夹提取的进展,但如果用户关闭窗口,这可能会导致我的C#程序中出现一些错误。 ExtractForm extractForm = new ExtractForm();
extractForm.Show();
Process zipProcess = new Process();
using (zipProces
private void Form1_FormClosing(object sender, FormClosingEventArgs e) //Save On Form Closing
{
XmlDocument xDoc = new XmlDocument();
xDoc.Load(path + "\\Address Book - Me \\settings.xml");
我写了一个窗口应用程序,它有两个不同的父窗体(窗体1和窗体2)。每个表格都有几个子表单。我登录后打开form1。现在我在form1上有一个按钮(称为切换到form2),它切换到form2。现在我需要在打开form2后关闭form1。我需要从form2到form1的相同的东西。 什么是最好的处理方法。 我试过类似下面的代码,通过添加这个代码来关闭窗体在每个窗体的表单加载下,但我得到以下异常。 A f
我MDI应用程序,并有其最终应用之前做一些工作有些OnFormClosing事件 - 这些行: Projekt.UnlockAllLockedProjects()
End 'completly close app
及以下全部代码: Protected Overrides Sub OnFormClosing(e As FormClosingEventArgs)
MyBase.OnFo
我已经在关闭表单前设置了一条警告消息,但是有没有办法跳过它? 我的代码: Sub Me_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
If MessageBox.Show("Are you sure you want to cancel the installation?",