Populate an image box using a Click action

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hope this should be a simple one, upon clicking a button I would like a black
image box to display a locally stored bitmap image. Assuming it requires
something like:

ImageBox.Image = "..\Image.bmp"

But can't get this to work, can anyone help?

Thanks
 
Luke,

Assuming you are coding in VB.NET

\\\
Dim Pic= New Bitmap(System.Drawing.Image.FromFile(Full Path)
ControlName.Image = Pic

///

HTH
 
lukegregory said:
Hope this should be a simple one, upon clicking a button I would like a
black
image box to display a locally stored bitmap image. Assuming it requires
something like:

ImageBox.Image = "..\Image.bmp"

But can't get this to work, can anyone help?


\\\
ImageBox.Image = Image.FromFile("..\Image.bmp")
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top