To MsgBox, or not to MsgBox

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Tony Proctor (tony_proctor_at_aimtechnology_NOSPAM.com)
Date: 03/27/04


Date: Sat, 27 Mar 2004 10:32:45 -0000

Does anyone know of a test that will indicate whether a MsgBox call is
legal, i.e. whether the current process/thread has access to a UI

Some situations (e.g. services, IIS, silent installs over a reboot) will
result in a hang if MsgBox is called. I accept the argument that such code
should not use MsgBox, but this is a common component and it's not actually
my "call".

            Tony Proctor



Relevant Pages

  • Re: To MsgBox, or not to MsgBox
    ... Tony Proctor wrote: ... i.e. whether the current process/thread has access to a UI ... > result in a hang if MsgBox is called. ... *specifically* on windows message boxes ...
    (microsoft.public.vb.general.discussion)
  • Re: To MsgBox, or not to MsgBox
    ... >result in a hang if MsgBox is called. ... semi-ownerless MessageBox on the screen, ... Sub Main ...
    (microsoft.public.vb.general.discussion)
  • Re: To MsgBox, or not to MsgBox
    ... MsgBox from a Windows Services, or from within an IIS component, and you'll ... >>result in a hang if MsgBox is called. ... > semi-ownerless MessageBox on the screen, ... > Sub Main ...
    (microsoft.public.vb.general.discussion)
  • Re: To MsgBox, or not to MsgBox
    ... You might be best off posting what your trying to do, ... easier for anyone thats replying (i.e. the code with the problem, ... > result in a hang if MsgBox is called. ...
    (microsoft.public.vb.general.discussion)
  • Re: To MsgBox, or not to MsgBox
    ... but I'd rather not wait for that length of type Bonj. ... In the "legal MsgBox" case, the user might not acknowledge it in time. ... >> result in a hang if MsgBox is called. ...
    (microsoft.public.vb.general.discussion)