단위 유닛 1;
인터페이스
용도
창, 메시지, 시스템, 변형, 클래스, 그래픽, 컨트롤, 양식,
대화 상자, extctrls, stdctrls, jpeg;
const lmousedown = false;
유형
tform1 = 클래스 (tform)
edit1 : 테디;
패널 2 : tpanel;
패널 1 : tpanel;
패널 3 : tpanel;
패널 4 : tpanel;
패널 5 : tpanel;
패널 6 : tpanel;
패널 7 : tpanel;
패널 8 : tpanel;
패널 11 : tpanel;
패널 22 : tpanel;
패널 33 : tpanel;
패널 44 : tpanel;
패널 55 : tpanel;
패널 66 : tpanel;
패널 77 : tpanel;
패널 88 : tpanel;
버튼 1 : tbutton;
절차 edit1mouseMove (Sender : Tobject; Shift : TshiftState; X,
Y : 정수);
절차 edit1mousedown (발신자 : Tobject; 버튼 : tmouseButton;
시프트 : TshiftState; x, y : 정수);
절차 edit1mouseup (sender : tobject; button : tmouseButton;
시프트 : TshiftState; x, y : 정수);
절차 formmousedown (sender : tobject; button : tmousebutton;
시프트 : TshiftState; x, y : 정수);
절차 button1mousedown (sender : tobject; button : tmousebutton;
시프트 : TshiftState; x, y : 정수);
프로 시저 버튼 1MousEmove (Sender : Tobject; Shift : TshiftState; X,
Y : 정수);
절차 button1mouseup (sender : tobject; button : tmousebutton;
시프트 : TshiftState; x, y : 정수);
사적인
{개인 선언}
공공의
{공개 선언}
끝;
var
form1 : tform1;
S, A : 부울;
구현
{$ r *.dfm}
프로 시저 ManipulateControl (Control : TControl; Shift : TshiftState; X, Y, Precision : Integer);
var sc_manipulate : 단어;
시작하다
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
// 光标在控件的最左侧 *************************************** *******************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
if (x <= 정밀) 및 (y> 정밀) 및 (y <control.height-precision)
그런 다음 시작하십시오
sc_manipulate : = $ f001;
control.cursor : = crsizewe;
끝
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
// 光标在控件的最右侧 *************************************** *******************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
else if (x> = control.width-precision) 및 (y> precision) 및 (y <control.height-precision)
그런 다음 시작하십시오
sc_manipulate : = $ f002;
control.cursor : = crsizewe;
끝
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
// 光标在控件的最上侧 ************************************** ****************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
else if (x> precision) 및 (x <control.width-precision) 및 (y <= 정밀도)
그런 다음 시작하십시오
sc_manipulate : = $ f003;
control.cursor : = crsizens;
끝
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
// 光标在控件的左上角 ************************************** ****************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
else if (x <= 정밀) 및 (y <= 정밀)
그런 다음 시작하십시오
sc_manipulate : = $ f004;
control.cursor : = crsizenwse;
끝
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
// 光标在控件的右上角 ************************************** ****************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
else if (x> = control.width-precision) 및 (y <= 정밀)
그런 다음 시작하십시오
sc_manipulate : = $ f005;
control.cursor : = crsizenesw;
끝
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
// 光标在控件的最下侧 *************************************** *******************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
else if (x> precision) 및 (x <control.width-precision) 및 (y> = control.height-precision)
그런 다음 시작하십시오
sc_manipulate : = $ f006;
control.cursor : = crsizens;
끝
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
// 光标在控件的左下角 ************************************** ****************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
else if (x <= 정밀) 및 (y> = control.height-precision)
그런 다음 시작하십시오
sc_manipulate : = $ f007;
control.cursor : = crsizenesw;
끝
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
// 光标在控件的右下角 ************************************** ****************
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
else if (x> = control.width-precision) 및 (y> = control.height-precision)
그런 다음 시작하십시오
sc_manipulate : = $ f008;
control.cursor : = crsizenwse;
끝
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
버 ***********
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
else if (x> 5) 및 (y> 5) 및 (x <control.width-5) 및 (y <control.height-5)
그런 다음 시작하십시오
sc_manipulate : = $ f009;
control.cursor : = crsizeall;
끝
그렇지 않으면 시작합니다
sc_manipulate : = $ f000;
Control.cursor : = Crdefault;
끝;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
if shift = [ssleft] 그러면
시작하다
방출;
control.perform (wm_syscommand, sc_manipulate, 0);
끝;
끝;
절차 tform1.edit1mouseMove (Sender : Tobject; Shift : TshiftState; X,
Y : 정수);
시작하다
manipulatecontrol ((tcontrol로 보낸 사람), shift, x, y, 9);
edit1.hint : = 'edit1 : tedit'+chr (13)+'원산지 :'+inttostr (edit1.top)+','
+inttostr (edit1.left)+';'+'size :'+inttostr (edit1.width)+inttostr (edit1.height)+chr (13)+'탭 정지 : ture; order : 0';
s = true라면
시작하다
A : = 거짓;
PANIL1.Visible : = true; PANIL2.Visible : = true; PANIL3.Visible : = true;
PANIL4.Visible : = true; PANIL5.Visible : = true;
PANIL6. Visible : = true; PANIL7.Visible : = true; 패널 8. Visible : = true;
패널1.top:=edit1.top-6;
PALEN1.LEFT : = edit1.left-6;
PANIL2.TOP:=EDIT1.TOP+(EDIT1.HEIGHT DIV 2) -3;
PALEN2.LEFT : = edit1.left-6;
PANIL3.top:=edit1.top+edit1.height;
PANIL3.left : = edit1.left-6;
PALEN4.TOP:=EDIT1.TOP-6;
PANIL4.left : = edit1.left+(edit1.width div 2);
PANIL5.TOP:=EDIT1.TOP+EDIT1.HEIGHT;
PANIL5.left : = edit1.left+(edit1.width div 2);
패널6.top:=edit1.top-6;
PANIL6.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;
끝;
끝;
절차 tform1.edit1mousedown (sender : tobject; 버튼 : tmousebutton;
시프트 : TshiftState; x, y : 정수);
시작하다
PALEN11.Visible : = false; PANIL22.Visible : = false; PANIL33. Visible : = false;
PANIL44.Visible : = false; PANIL555.Visible : = false;
PANIL66. Visible : = false; PANIL77. Visible : = false; PANIL88. Visible : = false;
S : = 참;
A : = 거짓;
PANIL1.Visible : = true; PANIL2.Visible : = true; PANIL3.Visible : = true;
PANIL4.Visible : = true; PANIL5.Visible : = true;
PANIL6. Visible : = true; PANIL7.Visible : = true; 패널 8. Visible : = true;
패널1.top:=edit1.top-6;
PALEN1.LEFT : = edit1.left-6;
PANIL2.TOP:=EDIT1.TOP+(EDIT1.HEIGHT DIV 2) -3;
PALEN2.LEFT : = edit1.left-6;
PANIL3.top:=edit1.top+edit1.height;
PANIL3.left : = edit1.left-6;
PALEN4.TOP:=EDIT1.TOP-6;
PANIL4.left : = edit1.left+(edit1.width div 2);
PANIL5.TOP:=EDIT1.TOP+EDIT1.HEIGHT;
PANIL5.left : = edit1.left+(edit1.width div 2);
패널6.top:=edit1.top-6;
PANIL6.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;
끝;
절차 tform1.edit1mouseup (sender : tobject; 버튼 : tmouseButton;
시프트 : TshiftState; x, y : 정수);
시작하다
s = true라면
시작하다
A : = 거짓;
S : = 거짓;
PANIL1.Visible : = true; PANIL2.Visible : = true; PANIL3.Visible : = true;
PANIL4.Visible : = true; PANIL5.Visible : = true;
PANIL6. Visible : = true; PANIL7.Visible : = true; 패널 8. Visible : = true;
패널1.top:=edit1.top-6;
PALEN1.LEFT : = edit1.left-6;
PANIL2.TOP:=EDIT1.TOP+(EDIT1.HEIGHT DIV 2) -3;
PALEN2.LEFT : = edit1.left-6;
PANIL3.top:=edit1.top+edit1.height;
PANIL3.left : = edit1.left-6;
PALEN4.TOP:=EDIT1.TOP-6;
PANIL4.left : = edit1.left+(edit1.width div 2);
PANIL5.TOP:=EDIT1.TOP+EDIT1.HEIGHT;
PANIL5.left : = edit1.left+(edit1.width div 2);
패널6.top:=edit1.top-6;
PANIL6.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;
끝;
끝;
절차 tform1.formmousedown (발신자 : Tobject; 버튼 : tmouseButton;
시프트 : TshiftState; x, y : 정수);
시작하다
A : = 거짓;
S : = 거짓;
PANIL1.Visible : = false; PANIL2.Visible : = false; PANIL3.Visible : = false;
PANIL4.Visible : = false; PANIL5.Visible : = false;
PANIL6.Visible : = false; PANIL7.Visible : = false; 패널 8. Visible : = false;
// **********
PALEN11.Visible : = false; PANIL22.Visible : = false; PANIL33. Visible : = false;
PANIL44.Visible : = false; PANIL555.Visible : = false;
PANIL66. Visible : = false; PANIL77. Visible : = false; PANIL88. Visible : = false;
끝;
절차 tform1.button1mouseup (sender : tobject; button : tmousebutton; shift : tshiftstate; x, y : integer);
a = true 인 경우 시작하십시오
시작하다
A : = 거짓;
S : = 거짓;
PANIL1.Visible : = false; PANIL2.Visible : = false; PANIL3.Visible : = false;
PANIL4.Visible : = false; PANIL5.Visible : = false;
PANIL6.Visible : = false; PANIL7.Visible : = false; 패널 8. Visible : = false;
PANEL11. Visible : = true;
PANIL22.Visible : = true;
PANIL33. Visible : = true;
PANIL44.Visible : = true;
PANIL555.Visible : = true;
PANIL66. Visible : = true;
PANIL77. Visible : = true;
PANIL88. Visible : = true;
패널 11.top:=Button1.top-6;
PANIL111.Left : = button1.left-6;
PANIL22.TOP:=BUTTON1.TOP+(BUTTON1.HEIGHT DIV 2) -3;
PALEN22.LEFT : = button1.left-6;
PANIL33.TOP:=BUTTON1.TOP+BUTTON1.HEIGHT;
panel33.left : = button1.left-6;
패널44.top:=Button1.Top-6;
PANIL44.left : = button1.left+(button1.width div 2);
PANIL55.TOP:=BUTTON1.TOP+BUTTON1.HEIGHT;
PANIL55.LEFT : = button1.left+(button1.width div 2);
패널66.top:=Button1.top-6;
PANIL666.Left : = button1.left+button1.width;
PANEL77.TOP:=BUTTON1.TOP+(BUTTON1.HEIGHT DIV 2) -3;
PANEL77.LEFT : = BUCTIL1.LEFT+BUCTLE1.WIDTH;
PANEL88.TOP:=BUTTON1.TOP+BUTTON1.HEIGHT;
PANEL88.LEFT : = BUTTIL1.LEFT+BUCTLE1.WIDTH;
끝;
끝;
절차 tform1.Button1mousedown (발신자 : Tobject; 버튼 : tmouseButton;
시프트 : TshiftState; x, y : 정수);
시작하다
A : = 참;
S : = 거짓;
PANIL1.Visible : = false; PANIL2.Visible : = false; PANIL3.Visible : = false;
PANIL4.Visible : = false; PANIL5.Visible : = false;
PANIL6.Visible : = false; PANIL7.Visible : = false; 패널 8. Visible : = false;
PANEL11. Visible : = true; PANIL22.Visible : = true; PANIL33. Visible : = true;
PANIL44.Visible : = true; PANIL555.Visible : = true;
PANIL66. Visible : = true; PANIL77. Visible : = true; PANIL88. Visible : = true;
패널 11.top:=Button1.top-6;
PANIL111.Left : = button1.left-6;
PANIL22.TOP:=BUTTON1.TOP+(BUTTON1.HEIGHT DIV 2) -3;
PALEN22.LEFT : = button1.left-6;
PANIL33.TOP:=BUTTON1.TOP+BUTTON1.HEIGHT;
panel33.left : = button1.left-6;
패널44.top:=Button1.Top-6;
PANIL44.left : = button1.left+(button1.width div 2);
PANIL55.TOP:=BUTTON1.TOP+BUTTON1.HEIGHT;
PANIL55.LEFT : = button1.left+(button1.width div 2);
패널66.top:=Button1.top-6;
PANIL666.Left : = button1.left+button1.width;
PANEL77.TOP:=BUTTON1.TOP+(BUTTON1.HEIGHT DIV 2) -3;
PANEL77.LEFT : = BUCTIL1.LEFT+BUCTLE1.WIDTH;
PANEL88.TOP:=BUTTON1.TOP+BUTTON1.HEIGHT;
PANEL88.LEFT : = BUTTIL1.LEFT+BUCTLE1.WIDTH;
끝;
절차 tform1.Button1mouseMove (Sender : Tobject; Shift : TshiftState; X,
Y : 정수);
시작하다
manipulatecontrol ((tcontrol로 보낸 사람), shift, x, y, 9);
edit1.hint : = 'button1 : tbutton'+chr (13)+'원산지 :'+inttostr (button1.top)+','
+inttostr (button1.left)+';'+'size :'+inttostr (button1.width)+inttostr (button1.height)+chr (13)+'탭 정지 : ture; order : 0';
a = true라면
시작하다
S : = 거짓;
PANIL1.Visible : = false; PANIL2.Visible : = false; PANIL3.Visible : = false;
PANIL4.Visible : = false; PANIL5.Visible : = false;
PANIL6.Visible : = false; PANIL7.Visible : = false; 패널 8. Visible : = false;
PANEL11. Visible : = true; PANIL22.Visible : = true; PANIL33. Visible : = true;
PANIL44.Visible : = true; PANIL555.Visible : = true;
PANIL66. Visible : = true; PANIL77. Visible : = true; PANIL88. Visible : = true;
패널 11.top:=Button1.top-6;
PANIL111.Left : = button1.left-6;
PANIL22.TOP:=BUTTON1.TOP+(BUTTON1.HEIGHT DIV 2) -3;
PALEN22.LEFT : = button1.left-6;
PANIL33.TOP:=BUTTON1.TOP+BUTTON1.HEIGHT;
panel33.left : = button1.left-6;
패널44.top:=Button1.Top-6;
PANIL44.left : = button1.left+(button1.width div 2);
PANIL55.TOP:=BUTTON1.TOP+BUTTON1.HEIGHT;
PANIL55.LEFT : = button1.left+(button1.width div 2);
패널66.top:=Button1.top-6;
PANIL666.Left : = button1.left+button1.width;
PANEL77.TOP:=BUTTON1.TOP+(BUTTON1.HEIGHT DIV 2) -3;
PANEL77.LEFT : = BUCTIL1.LEFT+BUCTLE1.WIDTH;
PANEL88.TOP:=BUTTON1.TOP+BUTTON1.HEIGHT;
PANEL88.LEFT : = BUTTIL1.LEFT+BUCTLE1.WIDTH;
끝;
끝;
끝.