宇
宇宙神
Unregistered / Unconfirmed
GUEST, unregistred user!
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, Menus;
type
TForm1 = class(TForm)
PopupMenu1: TPopupMenu;
N1: TMenuItem;
StringGrid1: TStringGrid;
OpenDialog1: TOpenDialog;
procedure N1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.N1Click(Sender: TObject);
var
ss:string;
begin
if (OpenDialog1.Execute) then
begin
ss:=OpenDialog1.FileName;
end;
showmessage(ss);
end;
end.
编译没有错误,可是运行有错误,而且是内存地址错的那种
帮我试试,好吗?
谢谢!
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Grids, Menus;
type
TForm1 = class(TForm)
PopupMenu1: TPopupMenu;
N1: TMenuItem;
StringGrid1: TStringGrid;
OpenDialog1: TOpenDialog;
procedure N1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.N1Click(Sender: TObject);
var
ss:string;
begin
if (OpenDialog1.Execute) then
begin
ss:=OpenDialog1.FileName;
end;
showmessage(ss);
end;
end.
编译没有错误,可是运行有错误,而且是内存地址错的那种
帮我试试,好吗?
谢谢!