ActiveX弹出对话框窗口从任务列表中隐藏IE [英] ActiveX pop-up dialogue window hides IE from tasklist

查看:127
本文介绍了ActiveX弹出对话框窗口从任务列表中隐藏IE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎只在IE6中发生

This seems to only happen in IE6

我用Delphi 7编写了一个activex表单。从IE6中的activex控件中打开的对话窗口显示在任务栏-用户(由于某种原因)不希望对话框显示在任务栏中。

I have an activex form written in Delphi 7. A dialogue window opened from within the activex control in IE6 gets displayed on the taskbar - the users (for some reason) do not want the dialogue to show in the taskbar.

所以我将对话框的borderStyle设置为bsToolwindow。这会隐藏任务栏上的对话框,但也会(副作用)将IE从Windows的任务列表中隐藏,这意味着如果您不选择Tab键,就无法< alt> Tab返回IE。

So I set the dialogue's borderStyle to bsToolwindow. This hides the dialogue from the taskbar but also has the (side-) effect of hiding IE from the task list in windows, which means that you cannot <alt>Tab back to IE if you tabbed away.

问题:如何从任务栏隐藏Activex弹出对话框,但仍在任务列表中列出IE6?

Question: How to hide the activex pop-up dialogue from the taskbar but still have IE6 listed in the tasklist?

推荐答案

将表单的所有者窗口设置为Activex表单(或者可能是ie窗口)。您可以实现这一目标通过在创建表单时传递activex表单作为所有者组件,并覆盖实例化表单的 CreateParams

Set the owner window of your form to be the activex form (or perhaps the ie window). You can achieve this f.i. by passing the activex form as the owner component while you're creating your form and overriding CreateParams of the instantiated form:

// in the activex form's unit
procedure TActiveFormX.Button1Click(Sender: TObject);
var
  f: TForm;
begin
  f := TForm1.Create(Self);
  f.BorderStyle := bsToolWindow;
  f.Show;
end;

// in the dialog unit
type
  TForm1 = class(TForm)
  private
  protected
    procedure CreateParams(var Params: TCreateParams); override;
  [...]

[...]
procedure TForm1.CreateParams(var Params: TCreateParams);
begin
  inherited;
  Params.WndParent := TCustomForm(Owner).Handle;
end;

这篇关于ActiveX弹出对话框窗口从任务列表中隐藏IE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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