Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 13th, 2012  |  syntax: None  |  size: 0.49 KB  |  hits: 40  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Delphi. Remove a border of TabSheet of PageControl
  2. unit Unit1;
  3.  
  4. interface
  5.  
  6. uses
  7.   ...,
  8.   CommCtrl;
  9.  
  10. type
  11.   TPageControl = class(ComCtrls.TPageControl)
  12.   private
  13.     procedure TCMAdjustRect(var Msg: TMessage); message TCM_ADJUSTRECT;
  14.   end;
  15.  
  16.   TForm1 = class(TForm)
  17.     ...
  18.   end;
  19.  
  20. ...
  21.  
  22. procedure TPageControl.TCMAdjustRect(var Msg: TMessage);
  23. begin
  24.   inherited;
  25.   if Msg.WParam = 0 then
  26.     InflateRect(PRect(Msg.LParam)^, 4, 4)
  27.   else
  28.     InflateRect(PRect(Msg.LParam)^, -4, -4);
  29. end;
  30.  
  31. ...
  32.  
  33. end.