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

📄 unitfrmmain.pas

📁 《Delphi7编程100例》代码,书配资料
💻 PAS
字号:
unit unitFrmMain;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;

type
  TForm1 = class(TForm)
  private
    { Private declarations }
    procedure WMMOVE(var Msg: TMessage); message WM_MOVE;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

{ TForm1 }

procedure TForm1.WMMOVE(var Msg: TMessage);
begin
  begin
    inherited;
    if (Left < 10) and (Top < 10) and
      (Left <> 0) and (Top <> 0) then // 设定移动到左上角 10 点范围内时贴到边上去
      begin
        Left := 0;
        Top := 0;
        Msg.Result := 0;
      end;
  end;

end;

end.

 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -