目前分類:Delphi世界 (2)

瀏覽方式: 標題列表 簡短摘要

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

elsun 發表在 痞客邦 留言(0) 人氣()


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

elsun 發表在 痞客邦 留言(0) 人氣()