首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

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

2013-01-07 
菜鸟请求看一下这个小程序中的问题unit Unit4interfaceusesWindows, Messages, SysUtils, Variants, Clas

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

热点排行