Re: How to hide form from Alt-Tab dialog



You need to change the style of your Window. You can do this by overriding
the CreateParams property of your form. The following should do the trick:

private static uint WS_POPUP = 0x80000000;
private static uint WS_EX_TOPMOST = 0x00000008;
private static uint WS_EX_TOOLWINDOW = 0x00000080;

protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.Style = unchecked((int) WS_POPUP);
cp.ExStyle = (int) WS_EX_TOPMOST + (int) WS_EX_TOOLWINDOW;

// Set location
cp.X = 100;
cp.Y = 100;

return cp;
}
}

HTH, Jakob.

--
http://www.dotninjas.dk
http://www.powerbytes.dk


"Dotnetjunky" wrote:

> ShowInTaskBar only hide the form from the TaskBar, but not from the Alt-Tab
> dialog
>
>
>
> "Danver Heung" wrote:
>
> > this.ShowInTaskBar = false;
> >
> > "Dotnetjunky" <me@xxxxxxxxxxxxx> дÈëÏûÏ¢ÐÂÎÅ
> > :6857A38A-EA25-4440-8DED-3A08D22902AD@xxxxxxxxxxxxxxxx
> > > Hi all,
> > >
> > > I'm creating a borderless form by setting this.FormBorderStyle =
> > > FormBorderStyle.None
> > >
> > > When I show the form, if users press Alt-Tab to switch among applications,
> > > they can still see it. How can I disable that ?
> > >
> > > Any help is very much appreciated.
> > >
> > > Kinh Luan
> >
> >
> >
.



Relevant Pages

  • Re: LogFS merge
    ... When sending patches that happens automatically. ... git the same trick. ... I can still see is the timing with the merge window. ...
    (Linux-Kernel)
  • Re: Diagnosing inoperative power window
    ... The left side rear seat window on my 99 Intrepid ... Just tried your trick. ... :> Is there a way to apply power directly to the motor to determine if it ... You will need to pull the door ...
    (rec.autos.makers.chrysler)
  • Re: Re: Sizing internet windows
    ... to manually resize the IE window by dragging. ... I have used another trick I picked up on another forum: ...
    (microsoft.public.windowsxp.basics)
  • Re: VMR-9 issues with IVMRWindowlessControl9::RepaintVideo
    ... Are you also overriding WM_ERASEBKGND to do a no-op for the window that ... screen-flickering. ... still don't understand why the SetBorderColormakes my whole video ... window black somtimes... ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Tasks and Errors box wont hide automatically
    ... Ted Zieglar wrote: ... annoyance for me as well. ... The trick is to click on the Hide button before ... the window closes by itself. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)