1588/足球 发表于 2012-6-20 11:35:57

问个问题啊 进来看看啊

用一个主窗体上的一个BUTTON ,调用另外一个FORM,怎么就不行了?之前一个都可以,在加一个就不行,帮帮忙吧!谢谢了file:///E:/Documents%20and%20Settings/Administrator/Application%20Data/Tencent/Users/915682514/QQ/WinTemp/RichOle/739(P2`2YA~T5VJZ136YD)4.jpg

1588/足球 发表于 2012-6-20 11:37:08

报错 Unit1.pas(1): Unable to invoke Code Completion due to errors in source code

1588/足球 发表于 2012-6-20 11:37:51

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, DB, ADODB, StdCtrls, Grids, DBGrids;

type
TForm1 = class(TForm)
    DBGrid1: TDBGrid;
    Button1: TButton;
    Button2: TButton;
    ADOConnection1: TADOConnection;
    ADOQuery1: TADOQuery;
    DataSource1: TDataSource;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
private
    { Private declarations }
public
    { Public declarations }
end;

var
Form1: TForm1;

implementation

uses Unit2;

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
Form2.ShowModal;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
ADOQuery1.Active:=true;
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
Form3.ShowModal;
end;

end.
页: [1]
查看完整版本: 问个问题啊 进来看看啊