Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » ProgressIndicator issue
Re: ProgressIndicator issue [message #53237 is a reply to message #53235] Tue, 24 March 2020 15:56 Go to previous message
Xemuth is currently offline  Xemuth
Messages: 387
Registered: August 2018
Location: France
Senior Member
idkfa46 wrote on Tue, 24 March 2020 15:41
Thank you for your support! Your solution is really interesting but the easiest solution is to call
ProcessEvents();

as suggested me by Omari.

Best,
Matteo


Indeed, it work as well without a thread ! the only default of this methode is (if I put it in my exemple) the gui is still lock during the Sleep function which is normal.
Their is howerver many workarround like doing this kind of things :
	void myCallBack(){
		button.Disable(); //Action on GUI
		ProcessEvents();
		for(int e = 0; e <  11; e++){
			progress = e;
			ProcessEvents();
			for(int i = 0; i < 100; i++){
				Sleep(10);
				ProcessEvents();
			}
			//Same as Sleep(1000) but with a better control on GUI (however it wont 'sleep' for
			// 1 second now, but for 1 sec +  100 * (processEvents() Time)
		}
		button.Enable();
		ProcessEvents();
		return;
	}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Help & Topics (in tab)
Next Topic: [SOLVED] Cloning Array of complexe type
Goto Forum:
  


Current Time: Sun Aug 24 13:36:01 CEST 2025

Total time taken to generate the page: 0.00595 seconds