VB.NET Görev Yöneticisini Kilitleme Programı kodları

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Uzman Üye
Katılım
17 Kas 2015
Mesajlar
265
Tepki puanı
9
Ödüller
8
10 HİZMET YILI
Bağlantıları görmek için lütfen Giriş Yap


Kod:
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
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst