K
keldlm
Guest
I am trying to translate a VB ver. 5 til Visual Basic 2019 and got the following problem.
I want to use Keypress to change an input of double quotes (Ascii 34) to single quotes(Ascii 39) in a Textbox.
I have the following code:
Private Sub TextBox1_KeyPress(keyascii As Integer) Handles TextBox1.KeyPress
If keyascii = 34 Then keyascii = 39
End Sub
IT gives the following error:
Error BC31029 Method ‘TextBox1_KeyPress’ cannot handle event ‘KeyPress’ because they do not have a compatible signature.
It seems to be a wrong amount of parameters ? What are I doing wrong ? Hope somebody will help me with a working code. I am a novice in Visual Basic
Keld Mortensen
Continue reading...
I want to use Keypress to change an input of double quotes (Ascii 34) to single quotes(Ascii 39) in a Textbox.
I have the following code:
Private Sub TextBox1_KeyPress(keyascii As Integer) Handles TextBox1.KeyPress
If keyascii = 34 Then keyascii = 39
End Sub
IT gives the following error:
Error BC31029 Method ‘TextBox1_KeyPress’ cannot handle event ‘KeyPress’ because they do not have a compatible signature.
It seems to be a wrong amount of parameters ? What are I doing wrong ? Hope somebody will help me with a working code. I am a novice in Visual Basic
Keld Mortensen
Continue reading...