using System.Drawing Namespace

private: System::Void btve_Click(System::Object^ sender, System::EventArgs^ e) {

System::Drawing::Pen^ myPen =gcnew System::Drawing::Pen (System::Drawing::Color::Red );
System::Drawing::Graphics^ formGraphics;
formGraphics = this->CreateGraphics();
formGraphics->DrawLine(myPen, 0, 0, 200, 200);//drawline
}

i using this code to draw the line in windows form aplication
please give me CODE to erase the line I had just drawed( i want to draw new line and delete the old line)
please! thanks
Last edited on
You appear to be using C++/CLI, which is not the same as C++.

Try asking your question here instead:
http://stackoverflow.com/questions/tagged/c%2b%2b-cli
Topic archived. No new replies allowed.