hiding form from alt-tab

G

Guest

In the 1.1 version of the framework setting ShowInTaskbar to false and
FormBorderStyle to none was enough to stop a form from showing up in the
alt-tab list. After porting the app to 2.0 all the forms now appear in the
alt-tab list. What do I need to do to hide the forms from the alt-tab list?
Thanks, Scott
 
G

Guest

I found this snippet which takes care of it.

protected override System.Windows.Forms.CreateParams CreateParams
{
get
{
System.Windows.Forms.CreateParams cp = base.CreateParams;
cp.ExStyle |= (int)Win32.ExToolWindow;
//cp.ExStyle -= (int)Win32.ExAppWindow;
return cp;
}
}
[Flags]
internal enum Win32 : int
{
ExToolWindow = 0x00000080,
ExAppWindow = 0x00040000,
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top