winforms - How do I generate an Image through C# code? -


i've got button in winforms plugin. it's got image on it. thing is, when click button, want image change whatever image now, whatever image want be.

so how make button change image? image type system.drawing.image.

in order change button's image in winforms set it's image property. can either load bitmap file bitmap.fromfile, or can draw image using graphic class creating new instance of bitmap using width/height constructor (i.e. new bitmap(100, 100)) , use graphic.fromimage method. lookup documentation on graphic class more info.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -