Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Comments
André Kraak 7-Dec-12 10:01am    
What legitimate reason would you have for hiding your program from the user?
joshrduncan2012 7-Dec-12 10:02am    
If you are using Visual Studio, set the "ShowInTaskBar" event to false.
Simon_Whale 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?

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.
 
Share this answer
 
v2
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.
 
Share this answer
 
i found it on MSDN:
try this
C#
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.
 
Share this answer
 
Comments
Gregory Gadow 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 7-Dec-12 14:58pm    
hiis it C# code ?
i can not run please test it
Don't think and search about legitimate reason ..
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900