
Untitled
By: a guest on
May 7th, 2012 | syntax:
None | size: 1.21 KB | hits: 18 | expires: Never
protected override void WndProc(ref Message m)
{
Thread.Sleep(100);
switch(m.Msg) {
case WMConstants.WM_SYSCOMMAND:
if(m.WParam.ToInt32() == WMConstants.SC_MINIMIZE)
{
Hide();
return;
}
else
{
break;
}
case WMConstants.WM_DEVICECHANGE:
if(m.WParam.ToInt32() == WMConstants.DBT_DEVICEARRIVAL)
{
supportedDevicesManager.CheckForNewDevices();
return;
}
else if(m.WParam.ToInt32() == WMConstants.DBT_DEVICEREMOVECOMPLETE)
{
supportedDevicesManager.CheckForRemovedDevices();
return;
}
else
{
break;
}
}
base.WndProc(ref m);
}