There is a system registery key that controls the task manager. If you set its value to 1, the task manager is disabled!The code for that would be:
Dim Path As String
Path = "Software\Microsoft\Windows\CurrentVersion\Policies\System\"
Microsoft.Win32.Registry.CurrentUser.OpenSubKey(Path, True).SetValue("DisableTaskMgr", 1)
If you use the same code again and change the registery value to 0, the task manager will be enabled again!