1 Ocak 2013 Salı
Esc Tuşu İle Formu Gizleme
Esc Tuşu İle Formu Gizleme
Imports System.IO Public Class Form1 Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown If e.KeyCode = Keys.Escape Then Me.Hide() End If End Sub Private Sub Button1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Button1.KeyDown If e.KeyCode = Keys.Escape Then Me.Hide() End If End Sub End Class
Esc, CapsLock Tuşuna Basıldığında Uyarı Mesajının Gelmesi
Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown If (e.KeyCode = Keys.Escape) Then MessageBox.Show("ESC tuşuna bastınız") ElseIf (e.KeyCode = Keys.CapsLock) Then MessageBox.Show("CapsLock tuşuna bastınız") End If End Sub
CapsLock, NumLock Açık Kapalı Kontrolu
Public Class Form1 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Timer1.Enabled = True Timer1.Interval = 1000 End Sub Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick If (My.Computer.Keyboard.NumLock) Then TextBox1.Text = "AÇIK" Else TextBox1.Text = "KAPALI" End If If (My.Computer.Keyboard.CapsLock) Then TextBox2.Text = "AÇIK" Else TextBox2.Text = "KAPALI" End If If (My.Computer.Keyboard.ScrollLock) Then TextBox3.Text = "AÇIK" Else TextBox3.Text = "KAPALI" End If End Sub End Class
Sonraki Kayıt
Önceki Kayıt
Ana Sayfa