С++ Как определить собственный метод в таймере?

Код взят отсюда https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.timer?view=windowsdesktop-6.0

private:
   static System::Windows::Forms::Timer^ myTimer = gcnew System::Windows::Forms::Timer;
   static int alarmCounter = 1;
   static bool exitFlag = false;

   // This is the method to run when the timer is raised.
   static void TimerEventProcessor( Object^ /*myObject*/, EventArgs^ /*myEventArgs*/ )
   {
      myTimer->Stop();
      
      // Displays a message box asking whether to continue running the timer.
      if ( MessageBox::Show( "Continue running?", String::Format( "Count is: {0}", alarmCounter ), MessageBoxButtons::YesNo ) == DialogResult::Yes )
      {
         
         // Restarts the timer and increments the counter.
         alarmCounter += 1;
         myTimer->Enabled = true;
      }
      else
      {
         
         // Stops the timer.
         exitFlag = true;
      }

Вот к примеру после myTimer->Stop(); я хочу использовать собственный метод(функцию), которая выглядит следующим образом :

System::Void Practform::MyForm::draw1(){
. . .
}

Но выдается следующая ошибка: E0020 идентификатор "draw1" не определен

Подскажите, как всё таки его определить? Буду благодарен за помощь, так как сильно встрял на этом моменте.


Ответы (0 шт):