eight);
curPoint.X :=X;
curPoint.Y :=Y;
oldPoint.X :=Left;
oldPoint.Y :=Top;
end; //end with
end; //end if
end;
procedure Tfrm_long.imgCaptionMouseMove(Sender: TObject;
Shift: TShiftState; X, Y: Integer);
begin
if not canmove then exit;
with Canvas do
begin
Rectangle(oldPoint.x,oldPoint.y,oldPoint.x+Width,oldPoint.y+Height);
oldPoint.x :=Left +X-curPoint.x;
oldPoint.y :=Top +Y-curPoint.y;
Rectangle(oldPoint.x,oldPoint.y,oldPoint.x+Width,oldPoint.y+Height);
end;
end;
procedure Tfrm_long.imgCaptionMouseUp(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
if not canmove then exit;
with Canvas do
begin
Rectangle(oldPoint.x,oldPoint.y,oldPoint.x+Width,oldPoint.y+Height);
Left :=oldPoint.x;
Top :=oldPoint.y;
Free;
end;
canmove:=not canmove;
end;
procedure Tfrm_long.FormCreate(Sender: TObject);
begin
lbCaption.Caption :=Caption;
dm.ado_user.open;
dm.ADO_user.Sort:='编号';
while not dm.ado_user.Eof do
begin
e_zzy.items.add(dm.ADO_user.fieldbyname('操作员').AsString);
dm.ADO_user.Next;
end;
e_zzy.ItemIndex:=0
procedure Tfrm_long.popSystemMenuPopup(Sender: TObject);
begin
N_Restore.Enabled :=imgSizeButton.Visible and (WindowState =wsMaximized);
N_Max.Enabled :=imgSizeButton.Visible and (WindowState =wsNormal);
n_min.Enabled:=imgMinButton.Visible;
N_Size.Enabled :=imgSizeButton.Visible ;
end;
procedure Tfrm_long.N_SizeClick(Sender: TObject);
begin
DefWindowProc(Handle, WM_SYSCOMMAND, SC_SIZE, 0);
end;
procedure Tfrm_long.N_MoveClick(Sender: TObject);
begin
DefWindowProc(Handle, WM_SYSCOMMAND, SC_MOVE, 0);
end;
procedure Tfrm_long.FormShow(Sender: TObject);
begin
if WindowState=wsNormal then
imgSizeButton.Picture.Bitmap :=imgMaxButton.Picture.Bitmap
else if WindowState=wsMaximized then
imgSizeButton.Picture.Bitmap :=imgRestoreButton.Picture.Bitmap
end;
procedure Tfrm_long.WMActivate(var Msg: TWMACTIVATE);
begin
if (Msg.Active =WA_ACTIVE) or (Msg.Active =WA_CLICKACTIVE) then
begin
imgCaption.Picture.Bitmap :=imgColorCaption.Picture.Bitmap;
imgLeftUp1.Picture.Bitmap :=imgColorLeftUp.Picture.Bitmap;
imgRightUp1.Picture.Bitmap :=imgColorRightUp.Picture.