小
小女人
Unregistered / Unconfirmed
GUEST, unregistred user!
在主窗体中有三个按钮都可以打开form3窗体代码如下:
procedure TForm12.Image1Click(Sender: TObject);
begin
ynumber:=100;
form3.Show;
end;
procedure TForm12.Image2Click(Sender: TObject);
begin
ynumber:=200;
form3.Show;
end;
。。。。
在form3里是这样写的:
procedure TForm3.FormShow(Sender: TObject);
begin
case ynumber of
100: image1.Picture.LoadFromFile(ExtractFilePath(Application.ExeName)+form2.ADOQuery2cp1.value);
200: image1.Picture.LoadFromFile(ExtractFilePath(Application.ExeName)+form2.ADOQuery2cp2.value);
300: image1.Picture.LoadFromFile(ExtractFilePath(Application.ExeName)+form2.ADOQuery2cp3.value);
问?为什么在不关闭第一次点击打开的form3窗体情况下点击第二个按钮form3内图片没有变?
procedure TForm12.Image1Click(Sender: TObject);
begin
ynumber:=100;
form3.Show;
end;
procedure TForm12.Image2Click(Sender: TObject);
begin
ynumber:=200;
form3.Show;
end;
。。。。
在form3里是这样写的:
procedure TForm3.FormShow(Sender: TObject);
begin
case ynumber of
100: image1.Picture.LoadFromFile(ExtractFilePath(Application.ExeName)+form2.ADOQuery2cp1.value);
200: image1.Picture.LoadFromFile(ExtractFilePath(Application.ExeName)+form2.ADOQuery2cp2.value);
300: image1.Picture.LoadFromFile(ExtractFilePath(Application.ExeName)+form2.ADOQuery2cp3.value);
问?为什么在不关闭第一次点击打开的form3窗体情况下点击第二个按钮form3内图片没有变?