private { Private declarations } fOldClientHeight: Integer; procedure WMNCRButtonDown(var Msg: TWMNCRButtonDown) ; message WM_NCRBUTTONDOWN; procedure TForm1.WMNCRButtonDown(var Msg: TWMNCRButtonDown); var h : integer; begin if (Msg.HitTest = HTCAPTION) then begin if (ClientHeight = 0) then begin for h := 0 to fOldClientHeight do ClientHeight := h; Application.ProcessMessages; end else begin fOldClientHeight := ClientHeight; for h := fOldClientHeight downto 0 do ClientHeight := h; Application.ProcessMessages; end; end; end;原始出處:About Delphi Programming
目前分類:Delphi世界 (2)
- Jun 18 Sat 2005 07:21
[ Delphi ] 讓視窗可以縮放
- May 07 Sat 2005 06:09
[ Delphi ] 設定滑鼠移至DBGrid資料列時顏色
type THackDBGrid = class(TDBGrid); ... procedure TForm1.DBGrid1MouseMove (Sender: TObject; Shift: TShiftState; X, Y: Integer); var gc: TGridCoord; begin
gc:= DBGrid1.MouseCoord(x, y); if (gc.X > 0) AND (gc.Y > 0) then begin