Make sure that your form contains the label_Click function:
void label_Click( System::Object^ sender, System::EventArgs^ e )
{
. . .
}
The name frmJogo should be the current form that contains the labels.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Friends.
I'm creating an array of labels inside a tableLayouPanel. I need Click event on each label. After a lot of research, I couldn't figure out how to do this. Here is the code for creating the labels and the error is exactly on the EventHandler line.
The error is on the line: label->Click += gcnew System::EventHandler(this, &frmJogo::label_Click), specifically on the word label_Click before the closing parenthesis.
The message is that label_Click is not a member of the form.
Thank you very much.
Make sure that your form contains the label_Click function:
void label_Click( System::Object^ sender, System::EventArgs^ e )
{
. . .
}
The name frmJogo should be the current form that contains the labels.
Hi Viorel.
Perfect.
The function was missing.
Thank you very much for your attention.