Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
i put show in task bar = false but when i run my program i can see it in the task manage how can i hide my application from task manager ?
Posted 7-Dec-12 3:48am
Comments
André Kraak at 7-Dec-12 10:01am
   
What legitimate reason would you have for hiding your program from the user?
joshrduncan2012 at 7-Dec-12 10:02am
   
If you are using Visual Studio, set the "ShowInTaskBar" event to false.
Simon_Whale at 7-Dec-12 10:03am
   
just a question but why would you want to hide your application from the task manager? how would you cancel it if it locked up?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

ShowInTaskBar only affects the form and determines if that form can show in the Task Bar, which is the bar acrossed the bottom of the Desktop. It has no effect at all on your application showing up in TaskManager.
 
You cannot hide your application from TaskManager. There is also never any legitimate reason to do so.
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

The primary function of Task Manager is to manage tasks. It cannot do this if it does not know what tasks are running. Therefore you cannot hide tasks from Task Manager.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

i found it on MSDN:
try this
first import the namespaces:
 
 
 
Imports System.Runtime.InteropServices
 
Imports System.Diagnostics
 
 
 
then declare the constants
 

Private Const SW_HIDE As Integer = 0
Private Const SW_RESTORE As Integer = 9
Private hWnd As Integer
 
 
then declare the win32 function
 
 
 
 
 
<dllimport("user32")> _
Private Shared Function ShowWindow(ByVal hwnd As Integer, ByVal nCmdShow As Integer) As Integer
 
 
then you have to create a method to get the process name that u want to hide
 
 
 
Private p As Process() = Process.GetProcessesByName("the name of your process")
 
hWnd = CType(p(0).MainWindowHandle, Integer)
 
 
 
now u call the function
 
 
 
ShowWindow(hWnd, SW_HIDE) 
 
 
 
 
 
Follow this and u'll hide your application of the processes .
 
 
 
note:If you rename your application to winlogon.exe even if your sister realized that the service is running with her user she won't be able to close it because the windows won't let cause winlogon.exe is a critical processes and can't be closed by the task manager.
 
 
 
 
  Permalink  
Comments
Gregory.Gadow at 7-Dec-12 11:21am
   
This is the COM way to hide an application's window. It does not hide the application from Task Manager, which is what the person was asking about.
farham_heidari at 7-Dec-12 14:58pm
   
hi
is it C# code ?
i can not run please test it
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Don't think and search about legitimate reason ..
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.140926.1 | Last Updated 24 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100