JannethOfelia
Programmer
Hi, Someone could help me help how to call an event inside another event in c + +?
Thanks
Thanks
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
TForm1::Button1Click(TObject *Sender)
{
Application->MessageBox("Button1 Handler!", NULL, MB_Ok);
};
TForm1::Button2Click(TObject *Sender)
{
Button1Click(Sender); //calls Button1's handler
};
TForm1::Button2Click(TObject *SEnder)
{
if (this->Button1->OnClick)
this->Button1->OnClick(Sender); // Calls Button1's OnClick Event through it's event property if it is assigned
}