Tab 键在 IWebbrowser2 中不起作用 [英] Tab key doesn't work in IWebbrowser2
问题描述
我正在使用 ActiveX 控件在 ATL 应用程序 (IWebbrowser2) 中实现嵌入式浏览器.问题是,我无法使用 Tab 键在文本字段之间跳转.按tab键什么也不做.按 Enter 键会按预期提交表单.问题存在,例如在 facebook 登录网站上.如何使tab键正常工作?我必须激活 ATL 控件中的某些内容才能使其工作吗?
I am using an ActiveX control to implement an embedded browser in an ATL app (IWebbrowser2). The problem is, that I can't jump between text fields using the tab key. Pressing the tab key just does nothing. Pressing the Enter key submits the form as expected. The problem exists e.g. on the facebook login site. How can I make the tab key work properly? Must I activate something in the ATL control to make this work?
谢谢!
法比安
推荐答案
本文介绍了一种如何在 C 中使用 IWebBrowser2 的方法:http://www.codeproject.com/KB/COM/cwebpage.aspx
This article describes a way how to use IWebBrowser2 in C: http://www.codeproject.com/KB/COM/cwebpage.aspx
在下面的一些评论中,人们有完全相同的问题.似乎 IWebBrowser2 只是有错误并且不会将键盘消息(不仅是 TAB,还有 CTRL+C 等)转换为预期的操作.在一些评论中有一个解决方法:http://www.codeproject.com/Messages/3558959/Re-hot-key-not-work.aspx
In some comments below it, people have exactly the same problem. Seems IWebBrowser2 just has bug and does not translate keyboard messages (not just TAB, but also CTRL+C etc.) to the expected actions. In some comment there has been a workaround: http://www.codeproject.com/Messages/3558959/Re-hot-key-not-work.aspx
但是我对 ActiveX 一无所知,所以我不知道这是否适用于您的情况.
However I have no knowledge about ActiveX so I have no idea if this is usable in your case.
这篇关于Tab 键在 IWebbrowser2 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!