DllCall("user32.dll", "bool", "SetProcessDpiAwarenessContext", @AutoItX64 ? "int64" : "int", -2) #include "MsgBoxEx.au3" ; $PAM_AllowDark - follows system color mode (light MsgBox in light mode, dark MsgBox in dark mode) ; $PAM_ForceDark - forces dark mode only MsgBox (use PAM_ForceDark if you only want dark mode MsgBox) ; $PAM_ForceLight - forces light mode only MsgBox _WinAPI_SetPreferredAppMode($PAM_AllowDark) $sMsg = "Let's click through a series of 6 MsgBox examples." $iRet = MsgBoxEx(BitOR($MB_TOPMOST, $MB_ICONINFORMATION, $MB_OK), "MsgBox 1", $sMsg, 0) $sMsg = "Would you like to continue?" $iRet = MsgBoxEx(BitOR($MB_TOPMOST, $MB_YESNOCANCEL), "MsgBox 2", $sMsg, 0) If $iRet <> $IDYES Then $sMsg = "Thank you for your time. Goodbye!" & @CRLF & @CRLF $sMsg &= "This MsgBox will automatically close in 10 seconds." MsgBoxEx(BitOR($MB_TOPMOST, $MB_OK), "MsgBox 3", $sMsg, 10) Exit EndIf $sMsg = "This is a fake warning!" $iRet = MsgBoxEx(BitOR($MB_TOPMOST, $MB_ICONWARNING, $MB_OK), "MsgBox 4", $sMsg, 0) $sMsg = "This is a fake error!" $iRet = MsgBoxEx(BitOR($MB_TOPMOST, $MB_ICONERROR, $MB_OK), "MsgBox 5", $sMsg, 0) $sMsg = "Thank you for your time. Goodbye!" & @CRLF & @CRLF $sMsg &= "This MsgBox will automatically close in 10 seconds." MsgBoxEx(BitOR($MB_TOPMOST, $MB_OK), "MsgBox 6", $sMsg, 10)