inno setup - How to show a message box for a specified time? -
is there way show message box specified time (that means, message box close when specified time elapses) ?
windows api has function showing message box specified time, reason function undocumented, means not officially supported , may subject change.
that function called messageboxtimeout
, , has export in user32.dll
library, makes me feel thing function lacks official documentation. knows...
the following script shows how display message box 5 seconds before wizard form shown. if user doesn't click ok button, nor manually close window, message box automatically closed when 5 seconds period elapses:
[code] #ifdef unicode #define aw "w" #else #define aw "a" #endif const mb_timedout = 32000; mb_iconerror = $10; mb_iconquestion = $20; mb_iconwarning = $30; mb_iconinformation = $40; function messageboxtimeout(hwnd: hwnd; lptext: string; lpcaption: string; utype: uint; wlanguageid: word; dwmilliseconds: dword): integer; external 'messageboxtimeout{#aw}@user32.dll stdcall'; procedure initializewizard; begin messageboxtimeout(wizardform.handle, 'this message automatically ' + 'closed in 5 seconds!', 'caption...', mb_ok or mb_iconinformation, 0, 5000); end;
for more information parameters , result values refer messagebox
function site , of unofficial articles describing messageboxtimeout
function itself, e.g.:
Comments
Post a Comment