Notes
Notes - notes.io |
Imports Microsoft.Win32 'register için
Public Class AnaFrm
Dim Parola As String = ""
Dim UygulamaAdi As String = ""
Private Property dword As String
<Runtime.InteropServices.DllImport("User32.dll")> _
Public Shared Function ShowWindowAsync(ByVal hWnd As IntPtr, ByVal swCommand As Integer) As Integer
End Function
Private Sub AnaFrm_FormClosed(sender As Object, e As System.Windows.Forms.FormClosedEventArgs) Handles Me.FormClosed
Try
Dim reg As Microsoft.Win32.RegistryKey
Dim subKey As String = "SoftwareMicrosoftWindowsCurrentVersionPoliciesSystem"
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
Public Sub AnaFrm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Height = 183
KalkanRengi = GetSetting(Application.ProductName, ProductName, "Kalkan Rengi", 1)
Select Case KalkanRengi
Case 1
KalkanFrm.BackColor = Color.SteelBlue
RadioButton1.Checked = True
Case 2
KalkanFrm.BackColor = Color.Yellow
RadioButton2.Checked = True
Case 3
KalkanFrm.BackColor = Color.Red
RadioButton3.Checked = True
Case 4
KalkanFrm.BackColor = Color.Green
RadioButton4.Checked = True
End Select
SesCmb.Items.Add("Hiçbiri")
SesCmb.Items.Add("Ses1")
SesCmb.Items.Add("Ses2")
SesCmb.Items.Add("Ses3")
SesCmb.SelectedIndex = 1
KlavyeyiBagla()
'Timer1.Start()
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ParolaTxt.TextChanged
If ParolaTxt.Text = Parola Then
Me.KapatBtn.Text = "KAPAT"
Panel2.Enabled = True
EtkinlestirBtn.Enabled = True
AcceptButton = KapatBtn
KapatBtn.Enabled = True
Else
Panel1.Enabled = True
End If
End Sub
Private Sub EtkinlestirBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EtkinlestirBtn.Click
If Not ParolaTxt.Text <> "" Then
'şifre girilmemişse
My.Computer.Audio.Play(Application.StartupPath & "sess02.wav", AudioPlayMode.WaitToComplete) : Exit Sub
End If
If SesCmb.SelectedIndex > 0 Then
My.Computer.Audio.Play(Application.StartupPath & "sess01.wav", AudioPlayMode.Background)
EtkinlestirBtn.Visible = False
End If
Parola = ParolaTxt.Text
ParolaTxt.Text = ""
Me.Hide()
Dim f As New KalkanFrm
f.Show()
ParolaTxt.PasswordChar = "*"
EtkinlestirBtn.Enabled = False
' TaskManegerden Pro Kapatmayı engellemek
' HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionPoliciesSystem
' DisableTaskMgr >Değeri 0 iken TaskManeger Görünür
' DisableTaskMgr >Değeri 1 iken TaskManeger Görünmez
Call RegistereUygula()
End Sub
Public Sub RegistereUygula()
Try
Dim reg As Microsoft.Win32.RegistryKey
Dim subKey As String = "SoftwareMicrosoftWindowsCurrentVersionPoliciesSystem"
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 KapatBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KapatBtn.Click
If Parola <> ParolaTxt.Text Then Me.Hide() : Exit Sub 'parola girilmezse çık
UnhookKeyboard()
If SesCmb.SelectedIndex > 0 Then
My.Computer.Audio.Play(Application.StartupPath & "sess02.wav", AudioPlayMode.WaitToComplete)
Dim f As New KalkanFrm
f.Hide()
End If
Me.Close()
End Sub
Private Sub AçBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AçBtn.Click
Call DosyaCalistir()
If Parola <> ParolaTxt.Text Then Me.Hide()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GözatBtn.Click
'OpenFileDialog1.ShowDialog()
OpenFileDialog1.Title = " Ekran Kilitliyken açmak istediğiniz bir Dosyayı Seçiniz"
OpenFileDialog1.Filter = "EXE Dosyalar|*.exe|Tüm Dosyalar|*.*"
OpenFileDialog1.FilterIndex = 1
OpenFileDialog1.FileName = "C:Program Files (x86)Windows Media Playerwmplayer.exe"
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
AçBtn.Enabled = True
DsyYoluTxt.Text = OpenFileDialog1.FileName
Else
'MessageBox.Show("Dosya seçmediniz")
AçBtn.Enabled = False
End If
End Sub
Public Sub DosyaCalistir()
Dim Engelle As Process
For Each Engelle In Process.GetProcesses
If Engelle.ProcessName = UygulamaAdi Then
Dim SureciBaslat As Process() = Process.GetProcessesByName(UygulamaAdi)
ShowWindowAsync(SureciBaslat(0).MainWindowHandle, 2) 'Minimize
ShowWindowAsync(SureciBaslat(0).MainWindowHandle, 9) 'Restore
Exit Sub
End If
Next Engelle
Try
System.Diagnostics.Process.Start(DsyYoluTxt.Text)
SurecAdiSakla()
Catch ex As Exception
MsgBox("Ekran Kilitli iken çalıştırılacak" & vbCrLf & " olan dosya yolu belirtilmemiş." & vbCrLf & "GÖZAT kısmından dosya seçiniz")
Me.Show()
End Try
End Sub
Private Sub SurecAdiSakla()
Console.WriteLine("***SurecAdiSakla")
Dim x As Byte
Dim Gecici As String = ""
Dim SurecYolu As String = DsyYoluTxt.Text
For x = 0 To SurecYolu.Length - 1
UygulamaAdi += SurecYolu.Chars(x)
If SurecYolu.Chars(x) = "" Then
UygulamaAdi = ""
End If
Console.WriteLine(UygulamaAdi)
Next
For x = 0 To UygulamaAdi.Length - 1
If UygulamaAdi.Chars(x) = "." Then Exit For
Gecici += UygulamaAdi.Chars(x)
Next
UygulamaAdi = Gecici
Console.WriteLine(UygulamaAdi)
End Sub
Private Sub TextBox2_TextChanged(sender As System.Object, e As System.EventArgs) Handles DsyYoluTxt.TextChanged
AçBtn.Enabled = True
End Sub
Private Sub YardımBtn_Click(sender As System.Object, e As System.EventArgs) Handles YardımBtn.Click
'326; 382
If Me.Height = 183 Then
Me.Height = 420
Else
Me.Height = 183
End If
End Sub
Private Sub Button1_MouseHover(sender As System.Object, e As System.EventArgs) Handles EtkinlestirBtn.MouseHover
Dim tooltip As New ToolTip()
tooltip.SetToolTip(EtkinlestirBtn, "Önce Şifre girişi Yapınız")
End Sub
Private Sub Button4_MouseLeave(sender As System.Object, e As System.EventArgs) Handles GözatBtn.MouseLeave
Dim tooltip As New ToolTip()
tooltip.SetToolTip(GözatBtn, "Çalışmasını istediğiniz bir program yolu Giriniz" & _
vbCrLf & "Kalkan aktifken F11 Tuşu ile Dosyayı çalıştırabilirsiniz.")
End Sub
Private Sub ComboBox1_MouseLeave(sender As System.Object, e As System.EventArgs) Handles SesCmb.MouseLeave
Dim tooltip As New ToolTip()
tooltip.SetToolTip(SesCmb, "Uyarı için bir ses seçiniz.")
End Sub
Private Sub Button5_MouseLeave(sender As System.Object, e As System.EventArgs) Handles YardımBtn.MouseLeave
Dim tooltip As New ToolTip()
tooltip.SetToolTip(YardımBtn, "Yardım için Tıklayın")
End Sub
Private Sub Button3_MouseLeave(sender As System.Object, e As System.EventArgs) Handles AçBtn.MouseLeave
Dim tooltip As New ToolTip()
tooltip.SetToolTip(AçBtn, "Yolunu belirlediğiniz dosyayı çalıştırın")
End Sub
Private Sub RadioButton1_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles RadioButton1.CheckedChanged
KalkanRengi = 1
KalkanFrm.BackColor = Color.SteelBlue
SaveSetting(Application.ProductName, ProductName, "Kalkan Rengi", KalkanRengi)
End Sub
Private Sub RadioButton3_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles RadioButton3.CheckedChanged
KalkanRengi = 2
KalkanFrm.BackColor = Color.Yellow
SaveSetting(Application.ProductName, ProductName, "Kalkan Rengi", KalkanRengi)
End Sub
Private Sub RadioButton2_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles RadioButton2.CheckedChanged
KalkanRengi = 3
KalkanFrm.BackColor = Color.Red
SaveSetting(Application.ProductName, ProductName, "Kalkan Rengi", KalkanRengi)
End Sub
Private Sub RadioButton4_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles RadioButton4.CheckedChanged
KalkanRengi = 4
KalkanFrm.BackColor = Color.Green
SaveSetting(Application.ProductName, ProductName, "Kalkan Rengi", KalkanRengi)
End Sub
Private Sub ParolaTxt_KeyDown(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles ParolaTxt.KeyDown
If e.KeyCode = Keys.Escape Then
Me.Hide()
End If
End Sub
Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
For Each selProcess As Process In Process.GetProcesses
If selProcess.ProcessName = "taskmgr" Then
selProcess.Kill()
Exit For
End If
Next
End Sub
End Class
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team