You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
namespace System.Windows.Forms
|
|
|
|
{
|
|
|
|
/// <summary>
|
|
|
|
/// This is a mono fix, windows handles this error, mono crashs
|
|
|
|
/// </summary>
|
|
|
|
public class MyUserControl : System.Windows.Forms.UserControl
|
|
|
|
{
|
|
|
|
public event FormClosingEventHandler FormClosing;
|
|
|
|
|
|
|
|
public void Close(object sender, FormClosingEventArgs e)
|
|
|
|
{
|
|
|
|
if (FormClosing != null)
|
|
|
|
FormClosing(sender,e);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void Close()
|
|
|
|
{
|
|
|
|
Close(this, new FormClosingEventArgs(CloseReason.UserClosing, false));
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override void WndProc(ref Message m)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
base.WndProc(ref m);
|
|
|
|
}
|
|
|
|
catch { }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|