diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-10-08 09:10:06 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-10-08 09:10:06 +0000 |
commit | 194923c172167eb3fc33807ec8009b255f86337e (patch) | |
tree | 1effc97a1bd872cc3a5eac7a361250cf283e0efd /plugins/!NotAdopted/Chess4Net/DraggedFigureUnit.pas | |
parent | b2943645fed61d0c0cfee1225654e5ff44fd96f8 (diff) |
Plugin is not adapted until someone can compile it and tell others how to do the same
git-svn-id: http://svn.miranda-ng.org/main/trunk@1809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/!NotAdopted/Chess4Net/DraggedFigureUnit.pas')
-rw-r--r-- | plugins/!NotAdopted/Chess4Net/DraggedFigureUnit.pas | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/plugins/!NotAdopted/Chess4Net/DraggedFigureUnit.pas b/plugins/!NotAdopted/Chess4Net/DraggedFigureUnit.pas new file mode 100644 index 0000000000..780e3bb840 --- /dev/null +++ b/plugins/!NotAdopted/Chess4Net/DraggedFigureUnit.pas @@ -0,0 +1,48 @@ +////////////////////////////////////////////////////////////////////////////////
+// All code below is exclusively owned by author of Chess4Net - Pavel Perminov
+// (packpaul@mail.ru, packpaul1@gmail.com).
+// Any changes, modifications, borrowing and adaptation are a subject for
+// explicit permition from the owner.
+
+unit DraggedFigureUnit;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, ExtCtrls;
+
+type
+ TDraggedFigure = class(TForm)
+ Image1: TImage;
+ procedure FormCreate(Sender: TObject);
+ procedure Image1MouseDown(Sender: TObject; Button: TMouseButton;
+ Shift: TShiftState; X, Y: Integer);
+ private
+ { Private declarations }
+ public
+ { Public declarations }
+ end;
+
+var
+ DraggedFigure: TDraggedFigure;
+
+implementation
+
+{$R *.dfm}
+
+procedure TDraggedFigure.FormCreate(Sender: TObject);
+begin
+ ClientWidth:= 40;
+end;
+
+
+
+procedure TDraggedFigure.Image1MouseDown(Sender: TObject; Button: TMouseButton;
+ Shift: TShiftState; X, Y: Integer);
+const SC_DRAGMOVE = $F012;
+begin ReleaseCapture;
+ Perform(WM_SYSCOMMAND, SC_DRAGMOVE, 0 );
+end;
+
+end.
|