locked
drawing image RRS feed

  • Question

  • User943411029 posted

    hi friends

    can i draw a image from the web page or url loaded in the iframe  in web form?

    Is alternative of DrawToBitmap() function  available in web form?

    Wednesday, June 25, 2008 7:52 AM

All replies

  • User-631337810 posted

    You can do this . Follow these small steps which is helping you in completeing your task:

    1. Create a project and name as as you wish in my example it is "FDraw"

    2. Set the back color of for "White".

    3. Use object browser to see what methods in you base class is overridden. The hierchy is like this Draw->FDraw->Bases and Interface->Form-> Container Control. In this if you find this method OnPaint(System.Windows.Forms.PaintEventArgs). if you find this then write this block of code in onPageLoad event.

     

    1    protected override void OnPaint( PaintEventArgs pe )
    2    {
    3    	Graphics g = pe.Graphics;
    4    	Pen myPen = new Pen( Color.Blue, 2 );
    5    	g.DrawLine( myPen, 10, 10, 210, 210 );
    6    	g.DrawLine( myPen, 10, 210, 210, 10 );
    7    	g.DrawEllipse( myPen, 50, 50, 200, 100 );
    8    	myPen.Dispose();
    9    }
    10   
    

     

     Now It is Done.

    If it helps any way, please mark as answer.

    Wednesday, June 25, 2008 9:04 AM