Home > database >  Don't accept certain key input, how to do?
Don't accept certain key input, how to do?

Time:10-01

Text box, only trigger presses a key, but don't want to let it show the key key, how to write?

According to the U key, for example, triggered by the events of U, but don't show U again text box.

CodePudding user response:

Is to define a keyboard shortcut, had better not letter key, switch to f5, f6

CodePudding user response:

reasonable

CodePudding user response:

Empty the text after trigger events, went, so as not to appear

CodePudding user response:

Just saw your avatar, startled, and I look too much like the
The problem, you can customize an event, if press the button you want, trigger events, it should write the last return 0, won't appear text box that character!

CodePudding user response:

Write wrong, should be a return 1
Custom: events eventid is pbm_char
The name of the event, own can change
IF the key=char (97) then
Messagebox (" ", "")
Return 1
End the if
I this is to define when the input is a lowercase "a", will quote information, you can refer to this change,

CodePudding user response:

reference 5 floor mmwmmw_bj reply:
write wrong, should be a return 1
Custom: events eventid is pbm_char
The name of the event, own can change
IF the key=char (97) then
Messagebox (" ", "")
Return 1
End the if
I this is to define when the input is a lowercase "a", will quote information, you can refer to this change,

In this way, in the Event ID for user-defined Event pbm_char writing code inside

CodePudding user response:

I am using dropdownlistbox control that can solve the problem
  • Related