开发者

ActiveX pop-up dialogue window hides IE from tasklist

This seems to only happen in IE6

I have an activex form written in Delphi 7. A dialogue window opened from within the activex control in IE6 gets disp开发者_JAVA百科layed on the taskbar - the users (for some reason) do not want the dialogue to show in the taskbar.

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.

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


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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜