f_asmaa
asked on
Virtual keyboard
Hello,
I need to implement virtual keyboard in VB.NET. It must send its characters to the current textbox or control
I need to implement virtual keyboard in VB.NET. It must send its characters to the current textbox or control
Hi,
If you just want to simulate key strokes, then use this simple function :
SendKeys.Send(YourString)
If you just want to simulate key strokes, then use this simple function :
SendKeys.Send(YourString)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you are using WIn XP, it already has a virtual keyboard. Go to Start-Run and type osk. You can call this from your app. Why do you need to reinvent a wheel?
ASKER
Because I want to disable some keys in Windows Virtual keyboard
Hi, how i can send Num Pad 0
I need check Num lock status and Active for Send this Key.
Thank you
I need check Num lock status and Active for Send this Key.
Thank you
Protected Overrides Function ProcessCmdKey(ByRef msg As System.Windows.Forms.Messa
Const WM_KEYDOWN As Integer = &H100
Const WM_SYSKEYDOWN As Integer = &H104
Dim e As System.EventArgs
If ((msg.Msg = WM_KEYDOWN) Or (msg.Msg = WM_SYSKEYDOWN)) Then
Select Case (keyData)
'The Number Key Pads, 10 key and regular 0-9 keys
Case Keys.NumPad0, Keys.D0
Case Keys.NumPad1, Keys.D1
Case Keys.NumPad2, Keys.D2
Case Keys.NumPad3, Keys.D3
Case Keys.NumPad4, Keys.D4
Case Keys.NumPad5, Keys.D5
Case Keys.NumPad6, Keys.D6
Case Keys.NumPad7, Keys.D7
Case Keys.NumPad8, Keys.D8
Case Keys.NumPad9, Keys.D9
Case Keys.Down
MyStr = RichTextBox1.SelectionType
'The Other Number Key Pads keys
Case Keys.Add, Keys.Oemplus
Case Keys.Divide, Keys.OemQuestion
Case Keys.Multiply, Keys.X
Case Keys.Subtract, Keys.OemMinus
Case Keys.Decimal
Case Keys.Enter
Case Keys.Back Or (Keys.Alt Or Keys.Back)
Case (Keys.Alt Or Keys.D1) Or (Keys.Alt Or Keys.NumPad1)
Case (Keys.Alt Or Keys.Oemplus)
Case (Keys.Alt Or Keys.C)
Case (Keys.Alt And Keys.Add)
Case (Keys.Alt Or Keys.Q)
Case (Keys.Alt Or Keys.D5)
Case (Keys.Alt Or Keys.R)
Case (Keys.Alt Or Keys.E)
'Do something
Case Keys.C, Keys.Escape 'Use for clearing display
'Do something
End Select
End If
Return MyBase.ProcessCmdKey(msg, keyData)
End Function