T
Tony Johansson
Hi!
In the C-tor I try to draw a red line from location 1,1 with width 20 to
location 100,100 but nothing is being drawn when the code is being executed.
So there must be somthing that I have missed here.
In the MCTS book 70-536 is says "To run this code, create a Windows forms
application and add the code to a method run during the form's Paint event."
I must say that graphics is very new to me so my knowledge is very limited.
public Form1()
{
InitializeComponent();
Graphics g = CreateGraphics();
Pen pen = new Pen(Color.Red, 20);
g.DrawLine(pen, 1, 1, 100, 100);
}
//Tony
In the C-tor I try to draw a red line from location 1,1 with width 20 to
location 100,100 but nothing is being drawn when the code is being executed.
So there must be somthing that I have missed here.
In the MCTS book 70-536 is says "To run this code, create a Windows forms
application and add the code to a method run during the form's Paint event."
I must say that graphics is very new to me so my knowledge is very limited.
public Form1()
{
InitializeComponent();
Graphics g = CreateGraphics();
Pen pen = new Pen(Color.Red, 20);
g.DrawLine(pen, 1, 1, 100, 100);
}
//Tony