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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows Forms and Images 2

Status
Not open for further replies.

dazzer123

IS-IT--Management
Joined
Nov 24, 2003
Messages
128
Location
GB
I have a VB.Net windows form that reads and navigates records in an SQL DB, within my DB for each record is a field that contains a path to an image (.bmp file) which is held on a shared drive. How can I display this image in my form when I navigate to the associated record.
 
MyPictureBox.Imaage = Image.FromFile(MyDataRow.Item("Image Path Column"))
 
Excellent, just what I was looking for.

Is it possible to resize the picture box to be the exact size of the image (they are all rectangular but change in size)
 
MyPictureBox.SizeMode = AutoSize
 
Excellent, thank you both for your help
 
Hi guys! im new here.. glad to meet u all

I was wondering if someone could help me... its very stupid... but i havent figured this out yet...

Im trying to insert a .emf file into a form... i have my picture box and all.. but the image keeps showing up waaay big... and i cant figure out how to make the image file fit into my picturebox..
does anyone know? :S

i´d appreciate ur help folks...
thanks in advance.

 
in addition to that last message... keeps sayign that the size property for that image is read only... :S
whats up with that? lol
hope u guys can help me...
thanks again!

 
Change the .SizeMode to StretchImage.
 
thanks dude... got it going...:) for some reason wasnt respecting that option, but now it does... thanks dude (Y)
 
thanks dude... got it going...:) for some reason wasnt respecting that option, but now it does... thanks dude (Y)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top