solus Posted October 24, 2003 Posted October 24, 2003 I have a console program that runs as a type of server written by some one else. The fact that it sits in my taskbar is kind of irritating. Is there any way, using c#, to write a third party program that'll hide it from the taskbar and and my desktop entirely? Quote Can't afford to be neutral on a moving train...
*Gurus* Derek Stone Posted October 24, 2003 *Gurus* Posted October 24, 2003 You can use the Win32 APIs [api]FindWindow[/api] and [api]ShowWindow[/api] to hide the window. Better yet, run the application as a Windows service. Quote Posting Guidelines
solus Posted October 25, 2003 Author Posted October 25, 2003 Thanks, the APIs worked great. [DllImport("user32.dll",EntryPoint="FindWindow")] private static extern IntPtr FindWindow( string _ClassName, string _WindowName ); [DllImport("user32.dll")] private static extern uint ShowWindow( IntPtr hWnd, int nCmd ); IntPtr wp = FindWindow( null, "Window Name" ); ShowWindow( wp, 0 ); 0 to hide and 1 to show again. For future reference ;D Quote Can't afford to be neutral on a moving train...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.