读书人

初学者请求看一下这个小程序中的有关问

发布时间: 2012-02-29 16:44:11 作者: rapoo

菜鸟请求看一下这个小程序中的问题
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的时候出错的

读书人网 >.NET

热点推荐