一个模拟输入法问题
我最近做了一个程序,程序中有西里尔文(俄文)和阿拉伯文输入的模块
为了方便我想做一个根Windows 标准输入法一样的模块。
这个我用 sendkey 的方法实现的:
Public Function KeyKz(ByVal KeyChar As String) As String
Dim kChar As String
Select Case KeyChar
Case "` "
kChar = "( "
Case "1 "
kChar = " " " "
Case "2 "
kChar = "ә "
Case "3 "
kChar = "і "
Case "4 "
kChar = "ң "
Case "5 "
kChar = "ғ "
Case "6 "
........
End Select
Return kChar
End Function
Private Sub RichTextInput_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles RichTextInput.KeyPress
e.Handled = True
SendKeys.Send(KeyKz(e.KeyChar))
e.Handled = False
End Sub
............
这个出现这样的异常:
1。按 "2 " 就能出现 "ә " .... 都很正常不过 2本身也出现了
2。如果把这个输入法改成阿拉伯的文字(阿拉伯文字是右向左写的我设置了 righttoleft=true)就无法显示。
谁能帮我解决这个问题?
[解决办法]
sendWait("{(}")