Re: How to assign image on a button at runtime



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
>
>


.