在vb中打开Chrome浏览器"Web浏览器控件" [英] open chrome browser in vb "web browser control"

查看:1210
本文介绍了在vb中打开Chrome浏览器"Web浏览器控件"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是vb 6.0的新手.

I am new to vb 6.0.

我必须在vb的Web浏览器控件中打开Internet Explorer以外的任何浏览器(默认情况下会打开IE)

I have to open any browser other than Internet Explorer in the web browser control of vb (which open IE by default)

我尝试了许多代码,现在可以打开浏览器,就像它是新窗口一样(通过使用process.start等)

I have tried many codes and I can now open browser as if it is new window (by using process.start etc)

有什么方法可以在现有的vb控件中打开它吗?

Is there any way to open it in existing vb control?

推荐答案

Web浏览器控件是Internet Explorer.因此,除非chrome等人发布了他们的浏览器没有的ActiveX控件,否则它们是不可能的.

The web browser control IS Internet Explorer. So unless chrome et al release a ActiveX control of their browser, which they haven't, it is not possible.

有一个解决方法是,先启动chrome,然后将其挂接到CreateWindowsEx,然后将您的Apps窗口作为所有者.然后使用SetWindowPos调整大小,使其具有Web浏览器控件的位置.这提供了以下功能

There is a workaround is that you start chrome and then hook it's CreateWindowsEx and put your Apps Window as the owner. Then size it where you would have the web browser control using SetWindowPos. This gives the following features

  • 拥有的窗口始终按Z顺序位于其所有者的上方.

  • An owned window is always above its owner in the Z order.

销毁所有者时,系统会自动销毁其拥有的窗口.

The system automatically destroys an owned window when its owner is destroyed.

最小化其所有者时,将隐藏拥有的窗口.

An owned window is hidden when its owner is minimized.

这篇关于在vb中打开Chrome浏览器"Web浏览器控件"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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