PC Review


Reply
Thread Tools Rate Thread

Disable Window Restore function?

 
 
joecool1969@live.com
Guest
Posts: n/a
 
      9th Apr 2009
You know when an app's main form is minimized, if you left click on
the taskbar icon, the System Menu Restore function is performed. I
would like to disable that. I tried:

private const Int32 WM_SYSCOMMAND = 0x112;
private const Int32 SC_RESTORE = 0xf120;

protected override void WndProc(ref Message m)
{
bool ignore = false;

if (m.Msg == WM_SYSCOMMAND)
{
switch (m.WParam.ToInt32())
{
case SC_RESTORE:
ignore = true;
break;
}
}

if (!ignore)
{
base.WndProc(ref m);
}
}

And that works. But only SOMETIMES.

Any idea what I am doing wrong?
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
is there a way to disable shadow copy but retain restore point function @ Windows7 M1 Windows Vista General Discussion 0 25th Jan 2008 08:44 PM
Excel 2003, function window has gone. how can I restore =?Utf-8?B?U3RvY2t5IHVr?= Microsoft Excel Misc 2 12th Aug 2007 01:44 AM
How to disable maximize, minimize, and restore on window?? =?Utf-8?B?Qm9ic29u?= Windows XP Internet Explorer 3 24th Apr 2007 02:43 AM
Disable "Window Restore" button Martureo Bob Microsoft Access Forms 1 2nd Mar 2006 05:00 PM
Disable Restore window button Bill Manville Microsoft Access Forms 2 2nd Aug 2004 06:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:18 PM.