I have a button click event handler that draws a graph.
System::Void Practform::MyForm::draw_Click(System::Object^ sender, System::EventArgs^ e)
{
. . .
}
then I decided to put the drawing of the graph into a separate function, since I would have to call it for the timer.and I got the following.many indentifiers turned out to be undefined:
I tried to follow the VS prompts but it didn't help either
at the same time, I have defined at the beginning of the cpp file:
using namespace System;
using namespace System::Windows::Forms;
tell me, what should I do to make them visible again?What should I write?
CodePudding user response:
You are missing a reference to the System::Drawing
assembly. Add
using namespace System::Drawing;
at the top of your program. System::Windows::Forms
contains classes related to, well, forms and controls. System::Drawing
contains class related to, well, drawing.