Lock Specific Keys on Keyboard with VB.Net Program

Asked By 20 points N/A Posted on -
qa-featured

In a program that I'm developing using VB.Net, I want to lock certain keys on the keyboard of the user for some reasons. Are there any built-in functions that allows visual basic lock key? Or if none exists, how could I do this?

SHARE
Answered By 0 points N/A #141726

Lock Specific Keys on Keyboard with VB.Net Program

qa-featured

Hello  Cassandramariannaa,

Hope that my message finds you well.
Please try the following:
For example if we want to disable the space key.
Put this in the KeyDown() event:

    If e.KeyCode = Keys.Space Then
        e.SuppressKeyPress = True
    End If

Hope this solution will help you and please let me know if you need anything else.
Kind regards,

 

Related Questions