使用Windows CE进行虚拟键盘编程 [英] Programming for Virtual Keyboard using Windows CE

查看:77
本文介绍了使用Windows CE进行虚拟键盘编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



谁能帮助我为Windows CE虚拟键盘编码.

我已经编写了以下代码,但是当光标位于文本中间时,它仍然无法工作,但仍在最后键入.

如果whichtxt ="A"然后
txtpatname.Text = txtpatname.Text& "a"
ElseIf whichtxt ="B"然后
txtpatage.Text = txtpatage.Text& "a"
如果结束

我想要这样一种代码,即无论我的光标在哪里,都应该从那里开始键入.
我正在使用Windows CE



在此先感谢您.

Hi,

Can anyone help me for coding Virtual keyboard for Windows CE.

I have written some code as below but its not working when my cursor is in middle of text, it is still typing at the end.

If whichtxt = "A" Then
txtpatname.Text = txtpatname.Text & "a"
ElseIf whichtxt = "B" Then
txtpatage.Text = txtpatage.Text & "a"
End If

I want a code in such a manner that where ever my cursor is it should start typing from there.
I am using Windows CE



Thanks in advance.

推荐答案

我会给您一个小时前发布的相同答案,然后删除它,因为您没有这样做. t喜欢答案:
I''ll give you the same answer I gave you when you posted this an hour ago, and then deleted it because you didn''t like the answer:
int myCursorPosition = txtpatname.SelectionStart;



查看有关此主题的先前问题的答案,并尝试考虑这些信息如何应用于您当前的任务.

我们不是要通过一次编写您的应用程序来参与有史以来最慢的开发"竞赛!



Look at the answers to your previous questions on this subject and try to think about how the information applies to your current task.

We are not here to collaborate in a "slowest development ever" competition by writing your app a little bit at a time!


您要附加字符
You are appending the characters
txtpatname.Text = txtpatname.Text & "a"



尝试使用 String.Insert [



Try inserting using String.Insert[^]

Use OriginalGriffs answer to determine the position

Regards
Espen Harlinn


这篇关于使用Windows CE进行虚拟键盘编程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆