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 » While loop, sleep
Re: While loop, sleep [message #60255 is a reply to message #60253] Thu, 26 October 2023 11:44 Go to previous messageGo to previous message
Oblivion is currently offline  Oblivion
Messages: 1214
Registered: August 2007
Senior Contributor
Hi,
Quote:
I trigger the while loop in a button. However, when I use sleep(), the whole program waits/freezes for the duration of sleep. Is there a way to run the loop parallel?


If you really need to loop -for a long time- in any function in a U++ gui app, you need to use Ctrl::ProcessEvents(). This function processes UI input/events.

E.g.

while(my_condition) {
 Ctrl::ProcessEvents();
 Sleep(20)
}



Best regards,
Oblivion


[Updated on: Thu, 26 October 2023 11:44]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Java Script
Next Topic: How do I write string_view to Cout() without copying to a String?
Goto Forum:
  


Current Time: Tue Jul 08 19:50:58 CEST 2025

Total time taken to generate the page: 0.04324 seconds