graphics panel in c# -
instead of setting image using 'background' property, draw image using graphics class on panel. how can in c#.net?
you can try following piece of code.
public class imagepanel:panel { private image image; public image image { { return image; } set { image = value; refresh(); } } protected override void onpaint(painteventargs e) { if(image!=null) { e.graphics.drawimage(this.image,point.empty); } base.onpaint(e); } }
Comments
Post a Comment