There is an old MS sample in the KB (https://ftp.zx.net.nz/pub/Patches/ftp.microsoft.com/MISC/KB/en-us/181/934.HTM)
Self-closing MessageBox
What would the code look like that displays a message that will close in 5 seconds?
I'm interested in Win32 functions, not the capabilities of programming languages (C#, C++, etc.).
4 answers
Sort by: Most helpful
-
-
RLWA32 45,476 Reputation points
2024-09-09T13:34:03.1+00:00 There is a Windows API function that will create a self-closing message box based on a timer - WTSSendMessageA function. Refer to the function's Timeout argument. You can obtain the session id of your own session by calling the ProcessIdToSessionId function.
-
Deleted
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
1 deleted comment
Comments have been turned off. Learn more
-
RLWA32 45,476 Reputation points
2024-09-12T15:19:34.23+00:00 If you are willing to write some code a timed message box can also be implemented using the TaskDialogIndirect function to take advantage of its built-in timer and callback feature.
TDF_CALLBACK_TIMER Indicates that the task dialog's callback is to be called approximately every 200 milliseconds.