偶是從C#過來的,請教各位大蝦!1。Delphi如何實現像C#中的Response.end();
2. Delphi如何實現公共定義的調用?可否提供示例代碼?謝

解决方案 »

  1.   

    1:close(關閉)或Application.Terminate;(關閉)
    2:
      public
        { Public declarations }
          procedure DrawLine;                              //定義畫線函數
          function  ttisempty:boolean;                     //定義是否為空值函數
      end;
    function TForm1.ttisEmpty:Boolean;     //處理鼠標在StringGrid1中按下時的事件 
        var
            a,b:integer;
    begin
       for a:=1 to StringGrid1.RowCount -1 do
          for b:=0 to StringGrid1.colcount-1 do
             if Trim(StringGrid1.cells[b,a])='' then
             begin
                 Result:=true;
                 Exit;
             end
             else
                 Result:=false;
    end;
    procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
      Rect: TRect; State: TGridDrawState);
    begin
       DrawLine;                         //掉用畫線
       if ttisempty=True then            //掉用ttisempty
    end;