Posted: Thu Oct 26, 2023 6:06 pm Post subject: LUA Force Form Update (Mouse)
Hello!
Suppose I have the following code.
Code:
function Form_ButtonSaveClick(sender)
Form_ButtonSave.Cursor = crHourGlass
-- ... long process ...
Form_ButtonSave.Cursor = crDefault
end
Now, I'd like to have the style of the cursor updated before the long process is over, and not when the function finished executing. Is there a way to achieve that?
I tried using different form things and show/hide them instead, but to no surprise, that also didn't work. I assume there might be some function I just can't find that updates stuff.
I'd like to have the style of the cursor updated before the long process is over, and not when the function finished executing.
This is ambiguous. Does the cursor not change to crHourGlass before it starts? Do you want it to change back to crDefault before or after the "long process" is over?
Whatever you're trying to do depends entirely on the "long process" you omitted. If it's asynchronous (e.g. createTimer, createThread, memscan.OnScanDone, etc.), then change the cursor back to crDefault at the end of the asynchronous code (remember to only access the GUI from the main thread). If it's synchronous, you should probably make it asynchronous to avoid freezing the GUI. _________________
I don't know where I'm going, but I'll figure it out when I get there.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum