如何让显示的窗口在桌面的最上面,而不被其他窗口遮住那?

wangzn1979 2002-06-24 07:04:06
如何让显示的窗口在桌面的最上面,而不被其他窗口遮住那?
...全文
260 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
Billy_Chen28 2002-06-25
  • 打赏
  • 举报
回复
你要显示的窗体.formstyle:=fsStayOnTop;
dreamfan 2002-06-25
  • 打赏
  • 举报
回复
form1.formstyle:=fsStayOnTop;
lyhold 2002-06-25
  • 打赏
  • 举报
回复
在最上面
form1.formstyle:=fsStayOnTop;


不让窗体关闭和移动!!!
private
{ Private declarations }
procedure WMSysCommand(var Msg:TWMSysCommand);message WM_syscommand;


procedure TMain.WMSysCommand(var Msg:TWMSysCommand);
begin
if Msg.CmdType=SC_close then
begin
end
else
if msg.CmdType =SC_MOVE then
begin
end
else
if msg.cmdtype=sc_restore then
begin
end
else
inherited;
end;
surfguy 2002-06-24
  • 打赏
  • 举报
回复
netlib(河外孤星)的是对的。
taxi 2002-06-24
  • 打赏
  • 举报
回复
procedure TForm1.FormCreate(Sender: TObject);
begin
SetWindowPos(Application.Handle, HWND_TOPMOST, 0, 0, 0, 0,
SWP_NOMOVE or SWP_NOSIZE);
end;
surfguy 2002-06-24
  • 打赏
  • 举报
回复
bringtofront
shadows 2002-06-24
  • 打赏
  • 举报
回复
Public

procedure Createparams(Var Params:TCreateParams);override;

...



procedure TFormDrop.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

wndParnet:=GetDesktopWindow; //关键一行,用SetParent都不行!!

end;

end;
netlib 2002-06-24
  • 打赏
  • 举报
回复
form1.formstyle:=fsStayOnTop;

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧