unit1.pas
来自「我的QQ历史查看器」· PAS 代码 · 共 51 行
PAS
51 行
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
var
FormStyle:LongInt;
FormHandle:HWND;
begin
FormHandle:=FindWindow('#32770','历史备忘录');
if FormHandle=0 then
begin
ShowMessage('QQ没有打开或者版本不一样。');
exit;
end;
try
FormStyle:=GetWindowLong(FormHandle,GWL_STYLE);
SetWindowLong(FormHandle,GWL_STYLE,FormStyle or WS_VISIBLE);
SetWindowPos(FormHandle,Handle,self.Left,self.Top,Self.width,Self.Height ,HWND_TOP);
PostMessage(Handle,WM_Close,0,0);
except
ShowMessage('发生错误');
end;
Form1.Show
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?