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

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -