Click here to Skip to main content
11,640,521 members (63,016 online)
Rate this: bad
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
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
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.
Rate this: bad
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.
Rate this: bad
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.
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
is it C# code ?
i can not run please test it
Rate this: bad
Please Sign up or sign in to vote.

Solution 4

Don't think and search about legitimate reason ..

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

  Print Answers RSS
0 Mika Wendelius 240
1 CPallini 209
2 OriginalGriff 165
3 Sergey Alexandrovich Kryukov 139
4 F-ES Sitecore 120
0 Mika Wendelius 200
1 OriginalGriff 145
2 CPallini 115
3 jgakenhe 40
4 sasanka sekhar panda 30

Advertise | Privacy | Mobile
Web02 | 2.8.150731.1 | Last Updated 24 Dec 2012
Copyright © CodeProject, 1999-2015
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