使用ms Interop Forms vb6的unicode [英] unicode using ms Interop Forms vb6

查看:119
本文介绍了使用ms Interop Forms vb6的unicode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我有一个使用Interop Forms Toolkit 2.1的互操作用户控件项目。一切顺利,直到我们开始在文本框互操作控件中键入unicode。如果我们将语言设置为中文并输入,我们就会获得韩语。其他语言相同。我们使用Arial Unicode字体,并在vb.net interop项目中工作,但不是vb6。奇怪的是,如果我在Kepress事件中在vb6中放置一个断点,并使用F8逐步执行它,一切运行良好并显示正确的unicode字符。我在这些活动中没有代码。我们花了一个月的时间来构建这个项目,认为它会起作用,直到我们得到了这个惊喜。如果我们复制并粘贴到文本框中,效果很好。



任何帮助表示赞赏。



Georges

hello,
I have an interop user controls projects using Interop Forms Toolkit 2.1. All wen well, until we started typing unicode in the text box interop control. If we set our language to Chinese, and type, we get Korean. same for other language. We are using Arial Unicode font, and works in vb.net interop project, but not vb6. The strange thing is, if I put a breakpoint in vb6 on the Keypress event, and step through it using F8, all works well and displays the proper unicode characters. I have no codes in these events. we spent a month building this project thinking it will work, untill we got this suprise. Works well if we copy and paste into the text box.

Any help is appreciated.

Georges

推荐答案

奇怪的是,如果我在Kepress事件的vb6中放置一个断点,并使用F8逐步执行它,一切正常并显示适当的unicode字符。

根据我的经验,一般来说,当任意两个电话之间发生竞赛时会发生这样的事情。通常,对于可以等待的呼叫,延迟/休眠几毫秒到一秒可以解决它。这可能会或可能不会解决,但值得一试。在您的按键事件中放置一个虚拟循环(或线程休眠),看看该延迟是否有帮助。
The strange thing is, if I put a breakpoint in vb6 on the Keypress event, and step through it using F8, all works well and displays the proper unicode characters.
In my experience, generally such thing happens when there is a race between any two calls. Generally, a delay/sleep of few millisecond to a second for the call that can wait resolves it. This might or might not resolve but worth a try. Put a dummy loop (or thread sleep) in your key press event and see if that delay helps.


这篇关于使用ms Interop Forms vb6的unicode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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