By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,890 Members | 1,097 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,890 IT Pros & Developers. It's quick & easy.

Populate an image box using a Click action

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Luke,

Assuming you are coding in VB.NET

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

///

HTH
"lukegregory" wrote:
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

Nov 21 '05 #2

P: n/a
"lukegregory" <lu*********@discussions.microsoft.com> schrieb:
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")
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.