Visual Studio VB Form Application Splash Screen not working as intended.

~OSD~ 2,176 Reputation points
2023-12-28T13:51:03.59+00:00

Hi,

I am using the Visual Studio community:

User's image

I have a form application and Form1 is used as the "Startup Form" and "New Splash Screen is used as a "Splash Screen"

User's image

Problem: The Flash Screen form didn't load as it should be.

If I start the application with "NewSplashScreen" form, it works fine as intended but not when used as Splash Screen.

Any thoughts? I have the latest version of Visual Studio, so it should not be related to some updates etc.
For example, see below, if I change the settings, the NewFlashScreen works as it should be.User's image

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,086 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,721 questions
{count} votes

Accepted answer
  1. Jiachen Li-MSFT 31,091 Reputation points Microsoft Vendor
    2024-01-02T07:34:52.3133333+00:00

    Hi @~OSD~ ,

    User's image

    Please check the Application.Designer.vb file to see if OnCreateSplashScreen() exists.

    Try to set the Me.MinimumSplashScreenDisplayTime to a larger value to see if it helps.

            Protected Overrides Sub OnCreateSplashScreen()
                Me.MinimumSplashScreenDisplayTime = 3000
                Me.SplashScreen = Global.WindowsApp20.SplashScreen1
            End Sub
    

    Best Regards.

    Jiachen Li


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. RLWA32 45,356 Reputation points
    2023-12-28T17:12:59.2333333+00:00

    After adding a splashscreen form to a project I set the minimum display time for the splash screen to 5 seconds as shown below. At first I tried to override the OnInitialize Function in the Application events but the compiler emitted error BC30260. So I made the change as shown in the image below. Then the splash screen was displayed as expected before the main form.

    splash

    And the results -

    VBSplash

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.