|
-
Oct 14th, 2005, 05:35 PM
#1
Thread Starter
New Member
How can I prevent "Show Desktop" or "Windows Key+M" from minimizing my program?
hi,
i don't want my program to be on "TopMost" but i also don't want it to minimize. Never.
even if i disable the minimize feature, the program can still be minimized by clicking on the "show desktop" icon or pressing Windows Key+M. I'd like to prevent that. Can someone tell me a possible way to do it?
and btw, the show desktop doesn't trigger the "resize" or "changesize" events.
Thanks,
-
Oct 15th, 2005, 01:47 AM
#2
Re: How can I prevent "Show Desktop" or "Windows Key+M" from minimizing my program?
Well to prevent minimising by Win+M you can do this:
Code:
protected override void WndProc (ref Message m)
{
const int WM_SIZE = 5;
if (m.Msg == WM_SIZE)
{
this.WindowState = FormWindowState.Normal;
}
base.WndProc(ref m);
}
That doesn't prevent complete hiding by Win+D (same as the Show Desktop icon). I'm still trying to figure out how you'd do that.
-
Oct 15th, 2005, 01:58 AM
#3
Thread Starter
New Member
Re: How can I prevent "Show Desktop" or "Windows Key+M" from minimizing my program?
oh, i must've made a mistake in my original post. i use a thinkpad, which doesn't have the windows key, so i thought windows+m was actually equal to "show desktop". i already know how to prevent minimization. but i'm really trying to find a way to prevent "show desktop" from minimizing/hiding my application. no success so far.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|