Home > Software engineering >  For help, visual studio, Windows forms application engineering, circulation to invoke a function? Th
For help, visual studio, Windows forms application engineering, circulation to invoke a function? Th

Time:09-16

Consult
The new
Visual studio
VC
Windos forms application


Then a function

Void f1 ()
{
;
}


I'm looking for a application every 0.005 seconds
() function is invoked a f1



If it is a console program

The main ()
{
While (true)
{
F1 ();
}
}


But now is application form,
How do you write?

Thank you very much!

CodePudding user response:

Very, very nasty
Thank you very much!

CodePudding user response:

Windows forms application can start the background thread calls
https://docs.microsoft.com/en-us/windows/win32/procthread/creating-threads



CodePudding user response:

Create a thread, and timer

CodePudding user response:

Must create a new thread?
If you don't create a new thread, how to deal with?

Thank you very much!

CodePudding user response:

If there is no thread with Windows timer, settimer

CodePudding user response:

SetTimer, timer, then process the timer event,
You are the MFC, or win32 compilation?

CodePudding user response:

MFC to write ah

CodePudding user response:

0.005 seconds=5 ms, high precision timer
  • Related