Jump to content

Anybody know delphi/pascal?


Iamdan

Recommended Posts

Basically I have some pictures in a folder, which is in the folder with the rest of the programs files.

 

 

 

\PSR(I have all the files for the program here)\Pictures\rock up.bmp

 

" "\paper up.bmp

 

" "\scissors up.bmp

 

" " \rock down.bmp etc

 

 

 

I have

 

If paperradiobtn.Checked = True then

 

P_Choice := 1;

 

 

 

(here I want to load a picture in the image called playerpic)

 

 

 

I have been searching for a while and I can't figure out how to do this.

 

 

 

All I found was

 

playerpic.Picture.LoadFromFile(Pictures\paper up.bmp);

 

 

 

Which doesn't compile, and I don't know if it's the right method anyway.

Link to comment
Share on other sites

Are you putting the:

 

 

 

Pictures\paper up.bmp

 

 

 

part of

 

 

 

playerpic.Picture.LoadFromFile(Pictures\paper up.bmp); 

 

 

 

in quotes?

 

 

 

It should be:

 

 

 

playerpic.Picture.LoadFromFile('Pictures\paper up.bmp');



{ ... or (if the first doesn't work?)... }



playerpic.Picture.LoadFromFile("Pictures\paper up.bmp"); 

 

 

 

I don't remember much Pascal, but I think that'll fix your problem.

ozXHe7P.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.