Kamis, 12 Mei 2016

Using Keypress Visual Basic

This is how to using keypress event in Visual Basic VB.NET. For Example below is code that handle "ENTER" keyboard with keyboard code "13". Replace action with you want to do.

If you want to change the "ENTER" event, replace "13" with others ASCII keyboard code.
    Try
        If e.KeyChar = Convert.ToChar(13) Then
           'Your Action Here... 
        End If
    Catch ex As Exception
        MsgBox(ex.Message)
    End Try

0 komentar:

Posting Komentar

Kita bukanlah apa-apa tanpaNya, jika ada pertanyaan mengenai artikel silakan tinggalkan komentar anda melalui form komentar :)

SkyArs Corp. © 2016. Tweaked by: Soni Sitez Powered by: Blogger