Re: How to assign image on a button at runtime
- From: "Peter Proost" <pproost@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 23 Dec 2005 08:17:10 +0100
If you want to get an image from your hard disk just use:
Button1.Image = Image.FromFile("c:\1.jpg")
If it's an Embedded Resource you can get it from the Assembly
Dim p As System.Reflection.Assembly
p = System.Reflection.Assembly.GetExecutingAssembly()
Button1.Image = Image.FromStream(p.GetManifestResourceStream(Me.GetType(),
"1.jpg"))
Hth
Greetz Peter and happy holidays
--
Programming today is a race between software engineers striving to build
bigger and better idiot-proof programs, and the Universe trying to produce
bigger and better idiots. So far, the Universe is winning. (Rich Cook)
"Kalim Julia" <kalim.julia@xxxxxxxxx> schreef in bericht
news:esZt6w3BGHA.228@xxxxxxxxxxxxxxxxxxxxxxx
> Anybody knows, How to assign image on a button at runtime
>
>
.
- Follow-Ups:
- Re: How to assign image on a button at runtime
- From: Ken Tucker [MVP]
- Re: How to assign image on a button at runtime
- References:
- How to assign image on a button at runtime
- From: Kalim Julia
- How to assign image on a button at runtime
- Prev by Date: Re: string to color
- Next by Date: Problem with .Net Framework 2 on certain machines
- Previous by thread: How to assign image on a button at runtime
- Next by thread: Re: How to assign image on a button at runtime
- Index(es):