Jump to content

Recommended Posts

[spoiler]
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
 
[/spoiler]

Esc, CapsLock Tuşuna Basıldığında Uyarı Mesajının Gelmesi 

 

[spoiler]

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 
 

[/spoiler]

 

Esc, CapsLock Tuşuna Basıldığında Uyarı Mesajının Gelmesi 

 

[spoiler]

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 
 

[/spoiler]

 

CapsLock, NumLock Açık Kapalı Kontrolu

 

[spoiler]

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 

[/spoiler]

Link to post
Share on other sites
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...