Splash Screen and Message Box

My app launches a splash screen and then attempts to authenticate the user in the database. If it fails, it displays a message box informing the user of this. This authentication takes place in the LOAD event of the MDI form.

My problem is that the message box always displays behind the splash screen. The only way to see it is to click anywhere on the app. Then the splash screen goes away and the message box is shown. If I try to refer to the splash screen to make it not visible or to dispose of it, I get a thread error.

Any workarounds

Thanks



Answer this question

Splash Screen and Message Box

  • Michael Shorten - MB Limited

    itsacrisis wrote:

    Thanks SJ

    When you say "I would have your main form load" in what event on my main form would you receommend that I put this logic At what event in the main form is it considered "loaded "

    Strangely enough at the end of the 'load' event . What you could do is 'load' everything, then in the end of the load event, show the form, then show your dialog box.



  • DChap

    When the main form is loaded, the splash screen goes away.

    I would have your main form load, and then have your authentication dialog pop up on top of that.

     It's more user friendly - having a dialog box in thin air is a bit disconcerting. The reason for a splash screen is to let your user know that something is happening when they started the application. They may go away and do something else for a few seconds and come back to it. If they see a login box, they may not know what it's necessarily for, and will wonder what happened to the application they started : people have very short attention spans - and that's just me!

    You can manually load your splash screen when the Application starts and close it prior to showing your login dialog box.

    Oh, and the splash screen runs in a different thread - you'd have to perform some delagating to do anything with it from your main form.



  • lukics

    Thanks SJ

    When you say "I would have your main form load" in what event on my main form would you receommend that I put this logic At what event in the main form is it considered "loaded "

     


  • FearTec

    Thanks for your response.

    Unfortunately, no to all. I should have also been clear that I am using the default VB2005 Splash Form capability - it is not one that I developed. So certain properties like AlwaysOnTop are not available.

    Does anyone know at what point the Splash Screen is released

     


  • Trust Coder

    Do you have the splash screen set to always display on top If so, this could be the reason why the msgbox appears behind the splash. It seems like you might have the splash always display on top and the msgbox is from a different form.

    You might try authenticating from the form that the splash screen is on. Then you can control whether the main form is even loaded or not...

    Hope this helps...


  • Splash Screen and Message Box