1过程里的(sender:Tobject)是什么意思?还有在过程里定义的参数和我们自己定义的变量有什么区别?
(大家不要笑 我们的老师是智力有问题我是自学的)
2with sender as TSQLmonitor什么意思??with语句的作用??详解以下!
3 overload是什么意思还有reintroduce是什么??
4  这是关键明天要交了 是一个组件我认为是use语句的错单就是找不出来 大家帮帮我谢谢了分不够再嫁!!!
uses
  SysUtils, Classes, Controls,XMLDOM,Graphics;TEditButton=class(TWinControl)
  private
  FButton:TButton;
  FEdit:TEdit;
    { Private declarations }
  protected
  procedure WMSize(var Message:TWMSize);mesage WM_SIZE;
  procedure SetText(Value:String);
  Function GetText:String;
  Function GetFont:TFont;
  procedure SetFont(Value:TFont);
  Function GetOnButtonClick:TNotifyEvent;
  procedure setOnButtonClick(Value:TNotfityEvent);
    { Protected declarations }
  public
  Constructor Create(AOwner:TComponent);override;
  Destructor Destroy;override;    { Public declarations }
  published
    { Published declarations }
    Property Text:String read GetText write SetText;
    Property Font:TFont read GetFont write SetFont;
    Property  OnButtonClick:TNotifyEvent read GetOnButtonClick write SetOnButtonClick;
procedure Register;implementationprocedure Register;
begin
  RegisterComponents('ActiveX', [TWinControl1]);
end;
constructor TEditButton.create(AOwer:TComponent);
begin
   inherited Create(AOwner);
   FEdit:=TEdit.Create(self);
   FEdit.parent:=self;
   FEdit.Height:=21;
   FButton:=TButton.create(self);
   FButton.Left:=FEdit.Width;
   FButton.Height:=19;
   FButton.Width:=19;
   FButton.Caption:='...';
   FButton.Parent:=self;
   Width:=FEdit.Width+FButton.Width;
   Height:=FEdit.Height;
   end;
destructor  TEditButton1.Destroy;
begin
  FEdit.Free;
  FButton.Free;
   inherited destroy;
   end;
   fuction TEditButton1.GetText:string;
   begin
   Result:=FEdit.Text;
   end;
   procedure TEditButton1.setText(Value:String);
   begin
     FEdit.Text:=value;
   end;
   fuction TEditButton.GetFont:TFont;
   begin
     Result:=FEdit.Font;
     end;
  procedure TEditButton.SetFont(Value:TFont);
  begin
    if Assigned(FEdit.Font)then
           FEdit.font.Assign(Value);
  end;
  fuction TEditButton.GetOnButtonClick:TNotifyEvent;
  begin
    Result:=FButton.onClick;
    end;
    procedure TEditButton1.SetOnButtonClick(value:tNotifyEvent);
    begin
       FButton.OnClick:=value;
       end;
       
  

解决方案 »

  1.   

    1.表示继承于tobject类;
    2.把组件作为tmonitor来使用,with是告诉你使用什么组件;
    3.贴出错误代码提示
      

  2.   

    1、sender:Tobject类似于str:string
    2、如果一个变量有多个属性,定义变量的各项值,你又不愿一一写出,可用
    with ** 
    begin
    end;语句,例如:
    with Edit1 do
    begin
        text:='aa';
        font.color:=clblue;
    end;
    3、overload 重载函数
    能不能给出错误提示或者整个代码
      

  3.   

    补充补充 ^_^
    1、Sender:TObject 中的Sender就是这个方法的接受者
    2、with sender as TSQLmonitor 这一句其实应该是:
       with (sender as TSQLmonitor) do begin ... end;
       好处是程序会在这里得到sender的地址,而其中的变量将在其基础上得到偏移量,
       避免了频繁的寻找sender的地址,同时使代码看起来更清晰
    3、没什么好说的
    4、还没看
      

  4.   

    unit BtnEdit;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      StdCtrls, Buttons;type  TButtonEdit = class(TWinControl)
      private
        FButton: TButton;
        FEdit: TEdit;
      protected
        procedure WMSize(var Message: TWMSize); message WM_SIZE;
        procedure SetText(Value: String);
        function  GetText: String;
        function GetFont: TFont;
        procedure SetFont(Value: TFont);
        function GetOnButtonClick: TNotifyEvent;
        procedure SetOnButtonClick(Value: TNotifyEvent);
      public
        constructor Create(AOwner: TComponent); override;
        destructor  Destroy; override;
      published
        property Text: String read GetText write SetText;
        property Font: TFont read GetFont write SetFont;
        property OnButtonClick: TNotifyEvent read GetOnButtonClick write SetOnButtonClick;
      end;procedure Register;implementationprocedure TButtonEdit.WMSize(var Message: TWMSize);
    begin
      inherited;
      FEdit.Width := Message.Width-FButton.Width;
      FButton.Left := FEdit.Width;
    end;constructor TButtonEdit.Create(AOwner: TComponent);
    begin
      inherited Create(AOwner);
      FEdit        := TEdit.Create(Self);
      FEdit.Parent := self;
      FEdit.Height := 21;
      FEdit.Width:=20;
      FButton := TButton.Create(Self);
      FButton.Left := FEdit.Width;
      FButton.Height := 19;
      FButton.Width  := 19;
      FButton.Caption := '...';
      FButton.Parent := Self;  Width  := FEdit.Width+FButton.Width;
      Height := FEdit.Height;
    end;destructor  TButtonEdit.Destroy;
    begin
      FButton.Free;
      FEdit.Free;
      inherited Destroy;
    end;function TButtonEdit.GetText: String;
    begin
      Result := FEdit.Text;
    end;procedure TButtonEdit.SetText(Value: String);
    begin
      FEdit.Text := Value;
    end;function TButtonEdit.GetFont: TFont;
    begin
      Result := FEdit.Font;
    end;procedure TButtonEdit.SetFont(Value: TFont);
    begin
      if Assigned(FEdit.Font) then
        FEdit.Font.Assign(Value);
    end;function TButtonEdit.GetOnButtonClick: TNotifyEvent;
    begin
      Result := FButton.OnClick;
    end;procedure TButtonEdit.SetOnButtonClick(Value: TNotifyEvent);
    begin
      FButton.OnClick := Value;
    end;procedure Register;
    begin
      RegisterComponents('ActiveX', [TButtonEdit]);
    end;end.
      

  5.   

    这个控件满简单的。把它拷贝,另存为:BtnEdit.pas,然后安装就行了。
    ps:兄弟,如果上面的代码是你写的话,那你的风格真成问题。-_-#
      

  6.   

    到六点啊,还有时间,回去看看delphi的书还来的急,呵呵