#2
Jiaoliu8882008-08-26 10:07
|
void __fastcall TForm1::Button1Click(TObject *Sender)
{
randomize();
for(int i=0;i<4;i++)
{
RandomData[i]=abs(RandomData[i]*random(15))+1;
if(i==0)
Image1->Picture->LoadFromFile("d:\My Documents\My Pictures\RandomData[i].jpg")
else if(i==1) //提示这里错误
Image2->Picture->LoadFromFile("d:\My Documents\My Pictures\RandomData[i].jpg")
else if(i==2)
Image3->Picture->LoadFromFile("d:\My Documents\My Pictures\RandomData[i].jpg")
else
Image4->Picture->LoadFromFile("d:\My Documents\My Pictures\RandomData[i].jpg")
}
Edit1->Text="";
Edit1->SetFocus();
}