label w/ image

atesh

Freshman
Joined
Aug 2, 2003
Messages
41
Location
Washington State, USA
Why doesn't this work? When I run the program, there is nothing where the image is supposed to be.

Visual Basic:
Dim label1 As New Label
Dim image1 As Image
image1 = Image.FromFile("F:\FFgm\back.bmp")
label1.Size = image1.Size
label1.Image = image1
 
You are creating a new label and not adding it to the form's control collection. The image shouldnt be a problem but the label itself is not visible.
 
Adding the image to the label was simply with VB.NET. I simply choose the image properties of the label. Then selected browse. Then find the path to the icons. It is pretty long, but was something like c:\Program Files\VB Studio.net\common 7\graphics\assorted. That out to get you close enough to find them. You may want to choose the thumbnail veiw to see what they look like. Hope this helps.
 
Back
Top