GDI+ DrawLine() in WinForms App

  • Thread starter Thread starter srfpala
  • Start date Start date
S

srfpala

Guest
In this Windows Forms application we have a button that, when clicked,
should cause a line to be drawn on the form. In
private: System::Void btnDrawLine_Click(System::Object^ sender, System::EventArgs^ e) {


System::Drawing::Pen(System::Drawing::Color::Red, 2); // is OK here
e->Graphics->DrawLine(RedPen, 10, 10, 300, 300); // The above line fails.
// seems e->Graphics doesn't work here ... so where should it go ?

Any ideas as to resolving this issue?


Bob

Continue reading...
 
Back
Top