L
lm_s
Unregistered / Unconfirmed
GUEST, unregistred user!
有两个窗体,我用下段代码使form2悬浮,但是form1我没有让他在任务栏隐藏任务条,结果我让form1隐藏,form2显示的时候,结果还是不能隐藏任务栏的任务条请问怎么回事,有什么办法没有?
public
procedure Createparams(Var Params:TCreateParams);override;
………………
procedure Tform2.Createparams(var Params:TCreateParams);
begin
Inherited CreateParams(Params);
With Params do
begin
EXStyle:=ExStyle or WS_EX_TOPMOST OR WS_EX_ACCEPTFILES or WS_DLGFRAME;
WndParent:=GetDesktopWindow;
end;
end;
procedure Tform2.FormCreate(Sender: TObject);
begin
SetWindowLong(dhform.Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW);
end;
public
procedure Createparams(Var Params:TCreateParams);override;
………………
procedure Tform2.Createparams(var Params:TCreateParams);
begin
Inherited CreateParams(Params);
With Params do
begin
EXStyle:=ExStyle or WS_EX_TOPMOST OR WS_EX_ACCEPTFILES or WS_DLGFRAME;
WndParent:=GetDesktopWindow;
end;
end;
procedure Tform2.FormCreate(Sender: TObject);
begin
SetWindowLong(dhform.Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW);
end;