展开全部
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, 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}
procedure TForm1.WMMOVE(var Msg: TMessage);
begin
Inherited;
if Left<0 then left:=0;
end;
end.
追问
if Left<0 then left:=0; 我在mouseUp事件中也这么写的,为啥不行呢
追答
mouseUp这个事件是窗口中放开鼠标键事件,不能捕获标题栏鼠标放开事件。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询