I have a piece of code:
setEnableControls(false);
lblLoading.Caption:='Loading tree contents, please wait.';
someBigLoading();
setEnableControls(true);
lblLoading.Caption:='';
The problem is, the label’s caption text doesn’t refresh until after the “big loading” is complete.
Is there a way to make the program process the message in the message queue, BEFORE going onto the next command?
Just call
lblLoading.Update. This will update the label and will not introduce any problems that can spur from processing messages in the middle of the code.