⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 floatwnd.pas

📁 SourceTo概述 SourceTo是一个源代码转换工具。它对于需要将源代码转成其他文本格式(比如HTML,RTF)的人来说将是一个好帮手。如果你有在网站上发表技术文章的习惯
💻 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 + -