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
Scott S. - 07 Jul 2006 21:37 GMT
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,
}