这儿有一个控件,非常简单,你自己看看吧
unit PageControlEx;
{
This component removes the border at the pagecontrol(only when there are one ore more tabs).
Copyright?998 Sigbjoern Revheim (Sigbjoern@mad.scientist.com)
Remember always to give credit when using freeware!
}
interface
uses
Windows,Messages,Classes,CommCtrl,ComCtrls;
type
TPageControlEx=class(TPageControl)
protected
procedure WndProc(var Message:TMessage); override;
end;
procedure Register;
implementation
procedure TPageControlEx.WndProc(var Message:TMessage);
begin
if(Message.Msg=TCM_ADJUSTRECT) then begin
Inherited WndProc(Message);
PRect(Message.LParam)^.Left:=0;
PRect(Message.LParam)^.Right:=ClientWidth;
PRect(Message.LParam)^.Top:=PRect(Message.LParam)^.Top-4;
PRect(Message.LParam)^.Bottom:=ClientHeight;
end else Inherited WndProc(Message);
end;
procedure Register;
begin
RegisterComponents('SRComponents', [TPageControlEx]);
end;
end.