drawing.graphics

edited April 2014 in FastReport .NET
dear all!

Pls help me!

i want to draw a cross line with start point and end point .

my code :
Pen p=new Pen(Color.Black,1);
Graphics g= new Graphics();
g.DrawLine(p,new Point(0,0),new Point(100,100));


mesg " system.darwing.graphics has no constructors defined !

Comments

  • edited 12:12AM
    hieu wrote: »
    mesg " system.darwing.graphics has no constructors defined !

    You can catch the event and take Graphics object from the event.
    Something like this:
            protected override void OnPaint(PaintEventArgs e)
            {
                Graphics g = e.Graphics;
                Pen p=new  Pen(Color.Black,1);
                g.DrawLine(p,new Point(0,0),new Point(100,100));
            }
    

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.