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

Popular posts from this blog

haskell - Using filter on an item in a list? -

c# - When does PreApplicationStartMethod actually get triggered to run? -

tomcat6 - Exception when stopping container for a with Spring + Quartz + Tomcat web application -