Показать сообщение отдельно
  #2  
Старый 20.07.2011, 09:01
Pyro Pyro вне форума
Так проходящий
 
Регистрация: 18.07.2011
Сообщения: 805
Версия Delphi: 7Lite
Репутация: 6063
По умолчанию

можно так:
PHP код:
procedure onbegin(whotcontrolxyinteger);
var
  
xytxy;
begin
  xy 
:= txy.Create;
  
xy.:= x;
  
xy.:= y;
  
who.Tag := integer(xy);
end;
procedure onmove(whotcontrolxyinteger);
var
  
xytxy;
begin
  
if who.tag 0 then Exit;
  
xy := txy(who.tag);
  
who.Width := who.Width - (xy.x);
  
who.Height := who.Height - (xy.y);
  
xy.:= x;
  
xy.:= y;
  
who.Tag := integer(xy);
end;
procedure onend(whotcontrolxyinteger);
begin
  txy
(who.Tag).Free;
  
who.tag := 0;
end
PHP код:
procedure TForm1.Shape1MouseDown(SenderTObjectButtonTMouseButton;
  
ShiftTShiftStateXYInteger);
begin
  onbegin
(Sender as tcontrolxy);
end;
procedure TForm1.Shape1MouseMove(SenderTObjectShiftTShiftStateX,
  
YInteger);
begin
  onmove
(Sender as tcontrolxy);
end;
procedure TForm1.Shape1MouseUp(SenderTObjectButtonTMouseButton;
  
ShiftTShiftStateXYInteger);
begin
  onend
(Sender as tcontrolxy);
end
Ответить с цитированием