unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, Grids;
type
TForm4 = class(TForm)
StringGrid1: TStringGrid;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
{$R *.dfm}
procedure TForm4.FormCreate(Sender: TObject);//编译后总是在这里显示红色
var
i: Integer;
begin
for i := 1 to 9 do
begin
StringGrid1.Cells[i,0]:=IntToStr(i);
StringGrid1.Cells[0,i]:=IntToStr(i);
end;
end;
end.
------解决方案--------------------------------------------------------
Delphi?
------解决方案--------------------------------------------------------
这段代码没问题
是不是其他窗体调用FORM4的时候出错的