type
  MyClass=class(MyParentClass)
  private
  ...
  public
  ...
end;

解决方案 »

  1.   

    TWDMemo = class(TCustomControl)
      private
        FScrollBars: TScrollStyle;
        FBorderStyle: TBorderStyle;
      protected
        procedure CreateParams(var Params: TCreateParams); override;
        procedure Paint; override;
      public
        constructor Create(AOwner: TComponent); override;
        destructor Destroy; override;
      end;implementationconstructor TWDMemo.Create(AOwner: TComponent);
    begin
      inherited Create(AOwner);
      Height := 200;
      Width := 320;
      ParentFont := False;
      Font.Name := 'Fixedsys';
      Font.Charset := GB2312_CHARSET;
      Font.Size := 12;
      Font.Style := [];
      Canvas.Font.Assign(Font);
      FScrollBars := ssBoth;
      FBorderStyle := bsSingle;
    end;destructor TWDMemo.Destroy;
    begin
      inherited Destroy;
    end;procedure TWDMemo.CreateParams(var Params: TCreateParams);
    const
      ScrollBar: array[TScrollStyle] of DWORD = (0, WS_HSCROLL, WS_VSCROLL,
        WS_HSCROLL or WS_VSCROLL);
      BorderStyles: array[TBorderStyle] of DWORD = (0, WS_BORDER);
    begin
      inherited CreateParams(Params);
      with Params do begin
        Style := Style or ScrollBar[FScrollBars] or BorderStyles[FBorderStyle]
          or WS_CLIPCHILDREN;
        if NewStyleControls and Ctl3D and (FBorderStyle = bsSingle) then begin
          Style := Style and not WS_BORDER;
          ExStyle := ExStyle or WS_EX_CLIENTEDGE;
        end;
      end;
    end;procedure TWDMemo.Paint;
    begin
      Canvas.FillRect(ClientRect);
    end;
      

  2.   

    呵呵,delphi不是有那么多unit吗?去打开看看就知,从Tobject到