📄 floatwnd.pas
字号:
unit FloatWnd;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TTBFloatingWindowParent = class(TForm)
private
procedure WMActivate(var Message: TWMActivate); message WM_ACTIVATE;
public
constructor Create(AOwner: TComponent); override;
end;
implementation
{ TTBFloatingWindowParent }
constructor TTBFloatingWindowParent.Create(AOwner: TComponent);
begin
inherited;
FormStyle := fsStayOnTop;
end;
procedure TTBFloatingWindowParent.WMActivate(var Message: TWMActivate);
begin
SendMessage(Application.MainForm.Handle, WM_NCACTIVATE,
Ord(Message.Active <> WA_INACTIVE), 0);
{if Message.Active <> WA_INACTIVE then
begin
if not IsWindowVisible(Handle) then
SetActiveWindow(FindTopLevelWindow(Handle));
end;}
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -