Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image associated with DB record? 1

Status
Not open for further replies.

Jonah86

Programmer
Dec 11, 2003
152
US
I'm trying to make it possible for a user to view a picture that will be related to the database record that they are currently viewing in my program. Say they are viewing the information for project A, and they want to see the picture that is related to project A; I just want a button to bring up the picture(in the program or outside of it) related to it. I was planning on just putting a form with an image object and changing the picture path at runtime. I would name the picture the same as the project number and then pull the project number from the form with the button to view the picture. This wont work it seems, as I can't change the 'picture' property at runtime.

So my question is, what is the best way to go about this? I considered putting the pictures in the database itself, but I'm not sure how to do that. I've never done anything like this before.

Thanks for your consideration:)

Lord I ask too many questions;)

Jonah
 
Hi,

If you want to load the image control picture at run time you can use...

imgPicture.Picture.LoadFromFile(<filename here>);



There are two ways to write error-free programs; only the third one works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top