How to lock taskmanager VB.NET 2010
if you have any issue, please contact.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | Imports Microsoft.Win32 'register için Public Class Form1 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Try Dim reg As Microsoft.Win32.RegistryKey Dim subKey As String = "Software\Microsoft\Windows\CurrentVersion\Policies\System" reg = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(subKey) reg.SetValue("DisableTaskMgr", "1") reg.Close() Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing Try Dim reg As Microsoft.Win32.RegistryKey Dim subKey As String = "Software\Microsoft\Windows\CurrentVersion\Policies\System" reg = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(subKey) reg.DeleteValue("DisableTaskMgr") reg.SetValue("DisableTaskMgr", 0) reg.Close() Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click Dim info As New ProcessStartInfo("taskmgr.exe") Process.Start(info) End Sub End Class |