Unit unit1;
Interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, StdCtrls, jpeg; const LMouseDown = False; type TForm1 = class (TForm) Edit1: TEdit; Panel2: TPanel; Panel1: TPanel; Panel3 Panel 4: TPANEL; Panel 4: TPANEL; Panel 7: TPANEL; Panel (Panel): panel22: tpanel; panel33: tpanel; panel44: tpagel; panel55: tpanel; panel66: tpanel; panel; panel66: tpanel; panel77: tpanel ; Panel88: TPanel; Button1: TButton; procedure Edit1MouseMove (Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure Edit1MouseDown (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Edit1MouseUp (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure FormMouseDown (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); procedure Button1MouseDown (Sender: TObject; Button: TMOUSEBUTTON; SH ift: TShiftState; X, Y: Integer); procedure Button1MouseMove (Sender: TObject; Shift: TShiftState; X, Y: Integer); procedure Button1MouseUp (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer) PRIVATE {Private Declarations}}
VAR FORM1: TFORM1; S, A: Boolean; Implementation
{$ R * .dfm}
Procedure manipulateControl (Control: tControl; Shift: tshiftstate; x, y, precision: integer; var sc_manipulate: word; begin // ~~~~~~~~~~~~~~ ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~ / / cursor at the left side of the control ******************************************* ********************* / / ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (X <= precision) and (y Control.cursor: = Crsizenwse; end // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ / / cursor in the upper right corner of the control ***** *********************************************************** ** / / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ else if (x> = control.width-precision) and (y <= precision) THEN begin SC_MANIPULATE: = $ F005; Control.Cursor: = crSizeNESW; end // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ / / cursor in the control of the control The lower side ******************************************************** ********* // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ else if (X> Precision) and (X End / / ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ / / cursor in the customer area of the control (mobile control) ******* ********************************* / / ~ ~~~~~~~~~~~~~~ ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~ else if (x> 5) and (y> 5) and (x Panel4.top:=EDit1.top-6; panel4.left: = Edit1.LEFT (Edit1.Width Div 2); panel5.top:=Edit1.top EDit1.height; panel5.left: = Edit1.Left (Edit1 .Width div 2); Panel6.top:=EDit1.top-6; panel6.left: = Edit1.Top:=Edit1.width; Panel7.top:=EDit1.top (Edit1.Height Div 2) -3; Panel7. Left: = Edit1.Left Edit1.Width; Panel8.top:=Edit1.top EDit1.height; panel8.left: = Edit1.Eft Edit1.Width; end; end; procedure (sender: Tobject) (Sender: Tobject; Button: TMouseButton; Shift: TshiftState; x, y: integer; begin Panel11.visible: = false; panel22.visible: = false; panel33.visible: = false; panel44.visible: = false; panel55.visible: = false; panel66.visible: = false; panel77.visible: = false; panel88 .Visible: = false; S: = true; A: = false; panel1.visible: = true; panel2.visible: = true; panel3.visible: = true; panel4.visible: = true; panel5.visible: = true; panel6.visible: = True; panel7.visible: = true; panel8.visible: = true; panel1.top:=edit1.top-6; panel1.top: = edit1.top (EL2.TOP :=Edit1.top (Edit1.height Div 2) -3; Panel2.left: = Edit1.Left-6; Panel3.top:=Edit1.top EDit1.height; panel3.top:= Edit1.top-; panel4.top:=EDit1.top- 6; panel4.left: = Edit1.LiDT (edit1.width div 2); panel5.top:=EDit1.top EDit1.height; panel5.left: = Edit1.Left (Edit1.Width Div 2); panel6.top : = edit1.top-6; panel6.left: = Edit1.Left Edit1.width; Panel7.top:=Edit1.top (Edit1.Height Div 2) -3; Panel7.left: = Edit1.Left Edit1. Width; panel8.top:=Edit1.top EDit1.height; panel8.left: = Edit1.Left edit1.width; end; Procedure TForm 1.EDit1Mouseup (Sender: Tobject; Button: tMouseButton; Shift: tshiftstate; x, y: integer; begin if s = true dam A: = false; s: = false; panel1.visible: = true; panel2. Visible: = true; panel3.visible: = true; panel4.visible: = true; panel5.visible: = true; panel6.visible: = true; panel7.visible: = true; panel8.visible: = true; panel1.top : = edit1.top-6; Panel1.Top: = Edit1.Left-6; Panel2.top:=Edit1.top (Edit1.Height Div 2) -3; Panel2.left: = Edit1.Left-6; Panel3. Top: = edit1.top edit1.height; panel3.left: = Edit1.Left-6; panel4.top:=EDit1.top-6; panel4.left: = Edit1.Left (Edit1.Width Div 2); Panel5 .Top: = edit1.top edit1.height; Panel5.left: = Edit1.Left (Edit1.Width Div 2); panel6.top:=EDit1.top-6; panel6.left: = Edit1.Left Edit1. Width; panel7.top:=EDit1.top (Edit1.height Div 2) -3; panel7.left: = Edit1.Left Edit1.width; Panel8.top: = Edit1.Top edit1.Height; panel8.Left: = edit1.Left edit1.Width; end; end; procedure TForm1.FormMouseDown (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); Begina: = false; s: = false; panel1.visible: = false; Panel2.visible: = false; panel3.visible: = false; panel4.visible: = false; panel5.visible: = false; panel6.visible: = False; panel7.visible: = false; panel8.visible: = false; // ********** Panel11.visible: = false; panel22.visible: = false; panel33.visible: = false; panel44.Visible: = false; panel55.Visible: = false; panel66.Visible: = false; panel77.Visible: = false; panel88.Visible: = false; end; procedure TForm1.Button1MouseUp (Sender: TObject; Button: TMouseButton; Shift: tshiftState; x, y: integer; begin if a = true dam A: = false; s: = false; panel1.visible: = false; panel2.visible: = false; panel3.visible: = false; panel4 .Visible: = false; panel5.visible: = false; panel6.visible: = false; panel7.visible: = false; panel8.visible: = false; Panel11.Visible: = true; panel22.visible: = true; panel33.visible: = true; panel44.visible: = true; panel55.visible: = true; panel66.visible: = true; panel77.visible: = true; panel88 .Visible: = true; panel11.top:=Button1.top-6; panel11.left: = button1.LEFT-6; Panel22.top:=Button1.top (Button1.Height Div 2) -3; Panel22.left: = Button1.Left-6; Panel33.top:=Button1.top Button1.Height; Panel33.Left: = Button1.EFT-6; Panel44.top:=Button1.top-6; Panel44.left: = Button1.Left (Button1.Width Div 2); panel55.top:=Button1.top Button1.height; Panel55.Left: = Button1.TOP :=Button1.top-6; panel66. LEFT: = Button1.Left Button1.Width; Panel77.top:=Button1.top (Button1.Height Div 2) -3; panel77.left: = button1.top:/button1.top:=Button1.top Button1.height; panel88.left: = Button1.Left Button1.Width; End; end; procedure tfor M1.Button1Mousedown (Sender: Tobject; Button: tMouseButton; Shift: TshiftState; x, y: integer; begin A: = true; s: = false; panel1.visible: = false; panel3. Visible: = false; panel4.visible: = false; panel5.visible: = false; panel6.visible: = false; panel7.visible: = false; panel8.visible: = false; Panel11.Visible: = true; panel22.visible: = true; panel33.visible: = true; panel44.visible: = true; panel55.visible: = true; panel66.visible: = true; panel77.visible: = true; panel88 .Visible: = true; panel11.top:=Button1.top-6; panel11.left: = button1.LEFT-6; Panel22.top:=Button1.top (Button1.Height Div 2) -3; Panel22.left: = Button1.Left-6; Panel33.top:=Button1.top Button1.Height; Panel33.Left: = Button1.EFT-6; Panel44.top:=Button1.top-6; Panel44.left: = Button1.Left (Button1.Width Div 2); panel55.top:=Button1.top Button1.height; Panel55.Left: = Button1.TOP :=Button1.top-6; panel66. LEFT: = Button1.Left Button1.Width; Panel77.top:=Button1.top (Button1.Height Div 2) -3; panel77.left: = button1.top:/button1.top:=Button1.top Button1.height; panel88.left: = button1.Left Button1.width; procedure TForm1.Button1MouseMove (Sender: TObject; Shift: TShiftState; X, Y: Integer); begin ManipulateControl ((Sender as TControl), Shift, X, Y, 9); edit1.Hint: = 'Button1: TButton' chr (13) ORIGIN: ' INTOSTR (Button1.top) ', ' INTON1.LEFT '; ' ' Size: ' INTOSTR (Button1.Width) INTOSTR (Button1.Height) CHR (13) 'Tab Stop: Ture; Order: 0'; if a = true dam s: = false; panel1.visible: = false; panel2.visible: = false; panel3.visible: = false; panel4. Visible: = false; panel5.visible: = false; panel6.visible: = false; panel7.visible: = false; panel8.visible: = false Panel11.Visible: = true; panel22.visible: = true; panel33.visible: = true; panel44.visible: = true; panel55.visible: = true; panel66.visible: = true; panel77.visible: = true; panel88 .Visible: = true; panel11.top:=Button1.top-6; panel11.left: = button1.LEFT-6; Panel22.top:=Button1.top (Button1.Height Div 2) -3; Panel22.left: = Button1.Left-6; Panel33.top:=Button1.top Button1.Height; Panel33.Left: = Button1.EFT-6; Panel44.top:=Button1.top-6; Panel44.left: = Button1.Left (Button1.Width Div 2); panel55.top:=Button1.top Button1.height; Panel55.Left: = Button1.TOP :=Button1.top-6; panel66. LEFT: = Button1.Left Button1.Width; Panel77.top:=Button1.top (Button1.Height Div 2) -3; panel77.left: = button1.top:/button1.top:=Button1.top Button1.height; panel88.left: = Button1.Left Button1.width; end; end; end.