Form1 unit uMain; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs; type TForm1 = class(TForm) procedure FormMouseDown(Sender:TObject; Button:TMouseButton;Shift:TShiftState;X,Y: Integer); procedure FormMouseMove(Sender: TObject; Shift: TShiftState;X,Y: Integer); procedure FormMouseUp(Sender:TObject;Button:TMouseButton;Shift:TShiftState;X,Y: Integer); procedure FormShow(Sender: TObject); private { Private declarations } public DocktoForm: Boolean; { Public declarations } end; var Form1: TForm1; CanMove, CanMoveX, CanMoveY: Boolean; OldX, OldY: Integer; F1X,F1Y,F2X,F2Y: integer; WorkArea : TRect; implementation uses uDock; {$R *.DFM} procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;Shift: TShiftState; X, Y: Integer); begin CanMoveX := true; CanMoveY := true; CanMove := true; OldX := X; OldY := Y; if DocktoForm then |
正在阅读:Delphi中的窗体移动Delphi中的窗体移动
2004-03-31 10:17
出处:delphi精髓网
责任编辑:sdq
键盘也能翻页,试试“← →”键