procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); begin if Y>=Screen.Height-1 then Self.SendToBack; end;
如果可以的话,在底部加一个 Panel, 在 Panel 的 OnMouseMove 里面处理……
这个效果不好,sendtoback后,会显示其它运用程序的窗口。
道理是一样的procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var H: hWnd; begin if Y>=Screen.Height-1 then begin H := FindWindow('Shell_TrayWnd', nil); if H<>0 then Windows.BringWindowToTop(H); end; end;
procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var H: hWnd; begin if Y>=Screen.Height-1 then begin H := FindWindow('Shell_TrayWnd', nil); if H <>0 then Windows.BringWindowToTop(H); end; end;五楼的正解,一般都是这么处理的。
Y: Integer);
begin
if Y>=Screen.Height-1 then Self.SendToBack;
end;
这个效果不好,sendtoback后,会显示其它运用程序的窗口。
Y: Integer);
var
H: hWnd;
begin
if Y>=Screen.Height-1 then begin
H := FindWindow('Shell_TrayWnd', nil);
if H<>0 then Windows.BringWindowToTop(H);
end;
end;
Y: Integer);
var
H: hWnd;
begin
if Y>=Screen.Height-1 then begin
H := FindWindow('Shell_TrayWnd', nil);
if H <>0 then Windows.BringWindowToTop(H);
end;
end;五楼的正解,一般都是这么处理的。
FindWindow('Shell_TrayWnd', nil);