我想寫一個模塊但是我不知道它的格式要怎么寫是否在
unit Unit2;interface
procedure TForm1.FormClick(Sender: TObject);  //是否在這邊用這個來定義事件.
implementationend.
大家能否給點提示或給一個事例.

解决方案 »

  1.   

    你参看delphi自带的单元呀,例如Classes单元等,指定单元然后按Ctrl+鼠标左键按下即可进入
      

  2.   

    要怎樣才能找到classes單元.
    我在open那邊進入samples但是沒有看到啊
      

  3.   

    還有一個問題就是要怎樣才能調用.
    比如我想把這樣一個清空代碼放入模塊到底要怎樣寫才是最好的.//這是清空edit和commbobx的內容.
    procedure TForm1.Button1Click(Sender: TObject);
    var
     i:integer;
    begin
     for i:=0 to form1.ComponentCount-1 do
     begin
       if form1.Components[i] is tedit then
          (form1.Components[i]  as tedit).Text:=''
       else if form1.Components[i] is tcombobox then
         (form1.Components[i] as tcombobox).Clear;
    end;
    end;