Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

hiding form from alt-tab

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott S. - 07 Jul 2006 17:16 GMT
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,
       }

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.