The Easiest Way I’ve Found to Make a Splash Screen

  1. ‹ Older
  2. 6 years ago

    Sam R

    3 Jul 2013 Pre-Release Testers, Xojo Pro Hengchun, Pingtung, Taiwan

    I used to use Splash Screens (App Wrapper features one), but new applications developed this year, I tried something different. I integrated the splash screen into the blank document. It appears to work quite well, I've attached an example below from a new app that we're wrapping up at the moment, the app icon hasn't been designed so it's currently showing the "Default" app icon.
    -image-
    This way every time there is a blank window it acts as a splash screen, but it's also functional. Of course when the user opens the app and it restores existing docs they don't see the splash screen, but they should know which app it is :)

  3. Oliver O

    3 Jul 2013 Pre-Release Testers, Xojo Pro https://udemy.seminar.pro

    I'm displaying a splash screen during a connection and initialization process, in a client/server app. A little text below the Logo is changing and showing where we are, while a progress indicator is turning.
    The Window contains a Canvas, a Textbox and a ProgressBar. I'm using a window of type plain box which is made transparent using MBS plugins:

    In the open event handler:

      Canvas1.Backdrop=Nil
      #If TargetCocoa Or TargetWin32
        Call Self.MakeTransparentMBS
      #EndIf

    -image-

  4. hi Oliver,
    I've tried but also the controls (canvas, textbox, etc. become transparent !!!
    Please, can you help me ?

  5. Beatrix W

    4 Jul 2013 Pre-Release Testers Europe (Germany)

    @Oliver: can you post an example on your website?

  6. Oliver O

    4 Jul 2013 Pre-Release Testers, Xojo Pro https://udemy.seminar.pro

    My App does not have a default window. From the App NewDocument or the OpenDocument event-handler, I run a method which handles login and initialization. Depending on the situation, I instantiate a WindowSplashScreen and close it when initialization etc is done. During this process, the method repeatedly sets Label1.Text and calls a refresh of WindowSplash...

    Here an example project just for showing the splash screen : splash.zip

  7. Beatrix W

    4 Jul 2013 Pre-Release Testers Europe (Germany)

    Thanks! Will have a look this evening.

  8. thanks me too,

  9. Richard D

    4 Jul 2013 Pre-Release Testers, Xojo Pro Europe (UK, London)

    very cool splash screen..what is the following codes for?? In the paint event.

    #If TargetCocoa Or TargetWin32
    Dim c As CGContextMBS

    If TargetCocoa Then
    c = GetCurrentCGContextMBS
    Else
    c=Self.CGContextMBS
    End If

    g.ForeColor = FillColor
    c.ClearRect CGMakeRectMBS(0, 0, g.width, g.height)

    #EndIf

    Exception

  10. Oliver O

    4 Jul 2013 Pre-Release Testers, Xojo Pro https://udemy.seminar.pro

    ClearRect clears the given CoreGraphics Context with a jpg returned by CGMakeRectMBS - and the whole thing is required to make the call to MakeTransparentMBS work ...

    Check out MBS examples and docu : MakeTransparentMBS

  11. Richard D

    4 Jul 2013 Pre-Release Testers, Xojo Pro Europe (UK, London)

    i understand...

  12. 5 years ago

    Thanks Gary McGuire. That worked splendidly!

    Luke

  13. 3 years ago

    I've tried the Oliver's sample but in winwos 7 and Xojo 2016r1 doesn,t work
    the window context c variable is always null...
    I neeed this sample to work also in linux . Is It possible witn the MBS plugin?
    thnks
    C

  14. Christoph D

    26 Jun 2016 Pre-Release Testers, Xojo Pro
    Edited 3 years ago

    Thats because it's OSX only (I guess)

  15. This line of code talks clear:
    #If TargetCocoa Or TargetWin32 .....
    And MBS plugin is documented that's working on Windows and Linux too... Is it a bug og MBS 16.1 plugin ?

  16. 10 months ago

    @Emile S I use a far easier way:

    I set the splash screen window the default one,
    In that window, a key press or a mouse down close the window and display the real main window,

    the real main window cannot be closed. If you want to exit, use the Exit MenuItem.

    Works fine on OS X too (use Quit instead).

    I set the splash screen window the default one,
    Please how is this done ?

  17. Emile S

    9 Jul 2018 Europe (France, Strasbourg)

    In the Navigator, press the App entry,
    in the right pane, search Window1 (or the name of your actual default window.

    Note: some people dislike Nag Screens.

    What I display is an information screen (Company logo + Name, Welcome, application name and data base properties).

    And since two years ago (or more), I add a MenuItem to display (later) that “Nag Screen”, time tells me that this information window can be useful (I do not display that information elsewhere, so…). And the client is happy.

  18. Christian S

    9 Jul 2018 Pre-Release Testers, Xojo Pro, XDC Speakers Germany

    You can also try our OverlayMBS class.

  19. Michel B

    9 Jul 2018 Pre-Release Testers RubberViews.com

    @Gilles P I set the splash screen window the default one,
    Please how is this done ?

    Click on App in the navigator, and in the Inspector, you will be able to select the default window.

  20. 4 days ago
    Edited 4 days ago

    Thanks Gary. Nice and simple. :)

    Question... For the Timer, should the Behavior mode be "Single" if I only want the splash screen to appear once when the application is started up?

or Sign Up to reply!