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 nastyThank you very much!
CodePudding user response:
Windows forms application can start the background thread callshttps://docs.microsoft.com/en-us/windows/win32/procthread/creating-threads
CodePudding user response:
Create a thread, and timerCodePudding 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, settimerCodePudding user response:
SetTimer, timer, then process the timer event,You are the MFC, or win32 compilation?
CodePudding user response:
MFC to write ahCodePudding user response:
0.005 seconds=5 ms, high precision timer