2 Replies - 1801 Views - Last Post: 04 October 2012 - 01:00 PM Rate Topic: -----

#1 xhanemila4  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 29-September 12

Saving the image from picture box as path

Posted 04 October 2012 - 12:33 PM

Hi guys, I'm trying to save the image within the registration of student (with open dialog) in database but i don't want the image but rather its path also i how can i call it and put to another picture box when a button click event occurs. I can't give a sample code since I don't have an idea.
Is This A Good Question/Topic? 0
  • +

Replies To: Saving the image from picture box as path

#2 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1605
  • View blog
  • Posts: 5,162
  • Joined: 25-September 09

Re: Saving the image from picture box as path

Posted 04 October 2012 - 12:49 PM

So in order to do this, you need a static area in relation to your exe where the images are stored.

You will have to determine how to set up that folder

Let's say you use Application.StartupPath & "\UserPics"

So what you now have to do is take the image that is displayed in the picturebox and store it to that path along with a unique filename.

At this point, you know where that is located so it's just a matter of putting that path into the field of the database.

Later when you want to retrieve it, you use that result as the filepath and filename to load the image back into the picturebox.

If you have nothing written, try getting to the point where you accept the user adding the image and saving it and building a string. From there you can then work on getting it in and out of the database.

If you get stuck, post the code along with any errors you're getting or problems you're having and someone will help get you moving forward again.
Was This Post Helpful? 1
  • +
  • -

#3 xhanemila4  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 14
  • Joined: 29-September 12

Re: Saving the image from picture box as path

Posted 04 October 2012 - 01:00 PM

Thank you Charlie for a good idea. I'll soon try that then I'll post the result in this same thread
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1