imgSizeButton.Picture :=imgMaxButton.Picture;
end;
end;
procedure Tfrm_passedit.imgCloseButtonClick(Sender: TObject);
begin
  DefWindowProc(Handle, WM_SYSCOMMAND, SC_CLOSE, 0);
end;
procedure Tfrm_passedit.imgCaptionMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  if (Button=mbLeft)and(ssLeft in Shift)then
  begin
    canmove:=true;
    Canvas:=TCanvas.Create;
    with Canvas do
    begin
      pen.Style :=psdot;
      brush.Style :=bsClear;
      pen.Width :=2;
      Pen.Mode :=pmNotXor;
      Handle :=GetDC(0);
      Rectangle(left,top,Left+width,top+height);
      curPoint.X :=X;
      curPoint.Y :=Y;
      oldPoint.X :=Left;
      oldPoint.Y :=Top;
    end;        //end with
  end;  //end if
end;
procedure Tfrm_passedit.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_passedit.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_passedit.FormCreate(Sender: TObject);
begin
  lbCaption.Caption :=Caption;
end;
procedure Tfrm_passedit.imgSysIconMouseDown(Sender: TObject;
  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
  PopSystemMenu.Popup(Left+ImgSysIcon.Left,Top+ImgSysIcon.Top+ImgSysIcon.Height);
end;
procedure Tfrm_passedit.popSystemMenuPopup(Sender: TObject);
begin
  N_Restore.Enabled :=imgSizeButton.Visible and (WindowState =wsMaximized);
  N_Max.Enabled :=imgSizeButton.Visible and (WindowState =wsNormal);
  N_Size.Enabled :=imgSizeButton.Visible ;
  n_min.Enabled:=imgMinButton.Visible;
end;
procedure Tfrm_passedit.N_SizeClick(Sender: TObject);
begin
  DefWindowProc(Handle, WM_SYSCOMMAND, SC_SIZE, 0);
end;
procedure Tfrm_passedit.N_MoveClick(Sender: TObject);
begin
  DefWindowProc(Handle, WM_SYSCOMMAND, SC_MOVE, 0);
end;
procedure Tfrm_passedit.FormShow(Sender: TObject);
begin
  if Windo
首页 上一页 7 8 9 10 11 12 下一页 尾页 10/12/12
delphi+AccessVCD租赁管理系统(开题报告+源程序+论文正文+外文翻译+答辩ppt)(十)由免费论文网(www.jaoyuw.com)会员上传。

