BorderStyle and Alt+Tab

  • Thread starter Thread starter Daniel Bello Urizarri
  • Start date Start date
D

Daniel Bello Urizarri

Hi:
Is there any way to show a window with no borders and that does not appears
in the ALT+TAB window?
 
* "Daniel Bello Urizarri said:
Is there any way to show a window with no borders and that does not appears
in the ALT+TAB window?

Set its 'ShowInTaskbar' property to 'True'.
 
Actually, it doesn't work either way. I just created a form, set
FormBorderStyle to FormBorderStyle.None, and then tried it both ways --
ShowInTaskbar = true and ShowInTaskbar = false. Either way, the form showed
up in the Alt+Tab list, whether it was the app's main form or a secondary
form.

If you set FormBorderStyle to FixedToolWindow (or SizableToolWindow) and
ShowInTaskbar to false, then the form no longer appears in the Alt+Tab list.
However, then the form isn't borderless any more.

I found something that does seem to work, though. Set the form's
FormBorderStyle to None and ShowInTaskbar to false, and then add the
following code to your form class:

protected override CreateParams CreateParams
{
get
{
CreateParams p = base.CreateParams;
p.ExStyle |= 0x00000080; // WS_EX_TOOLWINDOW
return p;
}
}
 
* "Joe White said:
Actually, it doesn't work either way. I just created a form, set
FormBorderStyle to FormBorderStyle.None, and then tried it both ways --
ShowInTaskbar = true and ShowInTaskbar = false. Either way, the form showed
up in the Alt+Tab list, whether it was the app's main form or a secondary
form.

You are right. I misread the OP's post...
 
Back
Top