问题
According to the documentation about the MsgBox argument vbMsgBoxSetForeground: "The message box window becomes the foreground window."
In Windows 10 I've the problem (in Windows 7 & XP I didn't have this problem) that some message boxes (VBScript called from a minimized batch file) are not visible because they are covered by other open windows.
That's why I wanted to add the argument vbMsgBoxSetForeground to my message boxes: Call MsgBox("Test Message", vbMsgBoxSetForeground). But unfortunately this doesn't work.
I've read many comments on the Internet about this argument and I could only find comments such as "does nothing", "has no effect", "doesn't work".
I also see no diffence between Call MsgBox("Test Message", vbMsgBoxSetForeground) and Call MsgBox("Test Message").
Does anyone know in what situation this argument has an impact or is this really an argument without any function?
PS: Currently I use Call MsgBox("Test Message", vbSystemModal). This brings the message box to the foreground, but unfortunately also keeps it in the foreground at all time, what I don't like.
来源:https://stackoverflow.com/questions/65639421/msgbox-argument-vbmsgboxsetforeground-has-no-function