IE8选项卡开关上的VB6 Activex控件错误 [英] VB6 Activex Control Error on IE8 Tab Switch

查看:122
本文介绍了IE8选项卡开关上的VB6 Activex控件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在IE8的多选项卡方案中,我们面临VB6 Activex控件问题.
上下文中的系统是经典的ASP Web应用程序.有多个VB6 ActiveX控件,它们实现了UI.经典ASP页面会加载这些VB6 ActiveX控件.

问题场景:在IE8的一个选项卡上加载这样的ASP页面之一,立即切换到IE8的另一个选项卡.
Activex控件在上一个选项卡上失败.它抛出一个称为无效过程".错误.
在调试时,我们发现实际方法失败是ActiveX中控件之一的SetFocus方法.

看来这是Windows处理程序存在的问题,Activex控件正在当前的活动选项卡中查找该控件,但找不到相同的控件.

任何解决方案,指针将是有帮助的.谢谢.

We are facing VB6 Activex control issue in multi-tab scenario of IE8.
System in context is a classic ASP web application. There are multiple VB6 ActiveX controls , which implements the UI. Classic ASP pages loads these VB6 ActiveX controls.

Problem scenario : Load one of such ASP page on one tab of IE8,immediately switch to another tab of IE8.
The Activex control fails on the previous tab. It throws an "invalid procedure called" error.
On debug we found that the actual method fails is SetFocus method of one of the control in ActiveX.

It looks like this is the problem with Windows handler, Activex control is looking for the control in the current active tab, and it fails to find the same.

Any solution,pointers would be helpful. Thanks .

推荐答案

解决方案听起来很明显.您的代码必须先确保找到正确的控件,然后再将重点放在该控件上.如果您的代码正在查看当前窗口,则不应找到该控件,在这种情况下,它不应执行任何操作.听起来您的代码假设控件始终存在并且始终可见.
The solution sounds rather obvious. Your code has to make sure that it finds the correct control before setting focus on it. If your code is looking at the current window, it shouldn''t find the control, in which case, it should do nothing. It sounds like your code is assuming that control is always there and always visible.


您遇到的一个问题是,您假设浏览器是页面加载时的活动窗口.事实并非如此.用户可以开始加载页面,并在页面加载并开始执行时将窗口切换到其他窗口.

您不能使用当前窗口"来查找控件.为什么不使用以下常规的VB6方法:
A problem you have is that you''re assuming that the browser is the active window when your page loads. That''s simply not the case. A user can start loading your page and switch windows to something else by the time your page loads and starts executing.

You cannot use the "current window" to look for controls. Why are you not using the normal VB6 method of:
TextBox1.SetFocus



甚至我也在Active X上工作.
我还面临将IE选项卡聚焦于IE 8的相同问题.
我们一直在使用IE 6,最近又移至IE8.
对于IE 6,EnumChildWindows API负责遍历IE选项卡并获取所有活动窗口的Windows处理程序.由于IE 6不是经过多语言浏览器处理,因此永远不会出现此问题.
是否有适用于IE 8或任何多选项卡浏览器的类似API.您可以提供给我的其他任何示例代码或函数,以便可以解决此问题
任何回应都将对gr8有所帮助!
谢谢,
Vidya
Hi,
Even i work on Active X.
I am also facing the same issue of bringing a IE tab to focus with IE 8.
We were using IE 6 all the while and recently moved to IE 8.
For IE 6 EnumChildWindows API took care of traversing through IE tabs and getting the windows handler for all active windows. Since IE 6 was not mutlitabbed browser this issue never came up.
Is there any similar API for IE 8 or any multitabbed browser. Else any sample code or function which you can provide me so that this issue can be addressed
Any response will be of gr8 help!
Thanks,
Vidya


这篇关于IE8选项卡开关上的VB6 Activex控件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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