Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Images not showing up
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
RGB255




PostPosted: Thu Sep 28, 2006 3:37 pm   Post subject: Images not showing up

Okay so today we were supposed to hand in our first sumative project electronicaly. The problem was that when the teacher tried to make the programs the images didn't want to show up does anyone know what's wrong?
Sponsor
Sponsor
Sponsor
sponsor
Silent Avenger




PostPosted: Thu Sep 28, 2006 3:41 pm   Post subject: (No subject)

Are you by any chance loading pictures using code?
RGB255




PostPosted: Thu Sep 28, 2006 3:44 pm   Post subject: (No subject)

Umm yes I think most of the people in my class are. Why is that a problem?
[Gandalf]




PostPosted: Thu Sep 28, 2006 3:47 pm   Post subject: (No subject)

Did you include the pictures with the source code when you submitted?
Silent Avenger




PostPosted: Thu Sep 28, 2006 3:52 pm   Post subject: (No subject)

Yes it is a problem. When you use the image.picture = loadpicture(image path) or other similar code you are specifically identifying the location. Therefore, if you hand it in electronically along with the picture the program will still want to search for the picture using the same directory and the teacher will most likely not have the picture in the same location as on your accounts. So, I suggest for you to put the pictures in a folder along with your program when you hand it in and use the following code:
code:
Image1.picture = Loadpicture(App.path & "\Folder Name\Image File Name.bmp)

That should prevent any images from not appearing. Also you should ask for extra marks for telling your teacher the solution.
RGB255




PostPosted: Thu Sep 28, 2006 3:57 pm   Post subject: (No subject)

Quote:
Did you include the pictures with the source code when you submitted?

Yes I did submit the images with the source code.
Quote:
Image1.picture = Loadpicture(App.path & "\Folder Name\Image File Name.bmp)

Are you sure that will work Silent Avenger?
Silent Avenger




PostPosted: Thu Sep 28, 2006 4:03 pm   Post subject: (No subject)

Yes I'm 120% sure that will work. My grade 10 class had the same problem while making a frogger game and the App.path fixed the problem. Just make sure your images are in the same location as your source code and it'll work. I'm sure there are other ways but I've always used the App.path method.
RGB255




PostPosted: Thu Sep 28, 2006 4:08 pm   Post subject: (No subject)

Well thanks once again Silent Avenger.
Sponsor
Sponsor
Sponsor
sponsor
Silent Avenger




PostPosted: Thu Sep 28, 2006 4:13 pm   Post subject: (No subject)

You're very welcome. I'm always glad to help.
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: