ListView1: TListView;
  procedure btn1Click(Sender: TObject);
    procedure WriteListViwe(x:Integer;y:Integer;juzhen2:juzhen);procedure TForm7.btn1Click(Sender: TObject);
begin
   getnumber(StrToInt(edt_hang.Text),StrToInt(edt_lei.Text));end;

procedure WriteListViwe(x:Integer;y:Integer;juzhen2:juzhen);
beginend;

我在form里插入了一个listview1 在第一个方法里能用listview1 可是第二(自己定义的)就用不了 为什么呀?

解决方案 »

  1.   

    procedure TForm7.WriteListViwe(x:Integer;y:Integer;juzhen2:juzhen); 
      

  2.   

    type
      TForm7 = class(TForm)
      private
        procedure WriteListViwe(x:Integer;y:Integer;juzhen2:juzhen);
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form7: TForm7;implementation{$R *.dfm}procedure TForm7.WriteListViwe(x:Integer;y:Integer;juzhen2:juzhen);
    beginend;end.
    或者:type
      TForm7 = class(TForm)
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form7: TForm7;implementation{$R *.dfm}procedure WriteListViwe(x:Integer;y:Integer;juzhen2:juzhen);
    beginend;end.