Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. My.Application.MinimumSplashScreenDisplayTime does not delay the main form load

My.Application.MinimumSplashScreenDisplayTime does not delay the main form load

Scheduled Pinned Locked Moved Visual Basic
csharpvisual-studiocomtoolshelp
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Marcus J Smith
    wrote on last edited by
    #1

    I am attempting to display a splash screen and delay the main form load by following the Microsoft instructions and am getting nowhere. I can always MAKE it work by treating the Splash Screen as the startup form and opening the main form from there but I would like to get the instructions that I found to work since it is supposed to be SOOOOOO simple. :) I have tried the code listed on MSDN[^] for this and it doesnt work like it is described. I found a thread on another forum that said to put the code in the Sub New of the Splash Screen code instead of the application code. Note, this is a 2.0 project that I set to compile in 3.5 in Visual Studio 2008. I dont know if that has something to do with the Splash Screen issue or not.


    CleaKO

    "Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)

    L 1 Reply Last reply
    0
    • M Marcus J Smith

      I am attempting to display a splash screen and delay the main form load by following the Microsoft instructions and am getting nowhere. I can always MAKE it work by treating the Splash Screen as the startup form and opening the main form from there but I would like to get the instructions that I found to work since it is supposed to be SOOOOOO simple. :) I have tried the code listed on MSDN[^] for this and it doesnt work like it is described. I found a thread on another forum that said to put the code in the Sub New of the Splash Screen code instead of the application code. Note, this is a 2.0 project that I set to compile in 3.5 in Visual Studio 2008. I dont know if that has something to do with the Splash Screen issue or not.


      CleaKO

      "Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I was going to check out that MSDN code but your link is to CodeProject. Got the link?

      M 1 Reply Last reply
      0
      • L Lost User

        I was going to check out that MSDN code but your link is to CodeProject. Got the link?

        M Offline
        M Offline
        Marcus J Smith
        wrote on last edited by
        #3

        That's strange, I'll try again. http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.applicationservices.windowsformsapplicationbase.minimumsplashscreendisplaytime(VS.85).aspx[^]


        CleaKO

        "Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)

        L 1 Reply Last reply
        0
        • M Marcus J Smith

          That's strange, I'll try again. http://msdn.microsoft.com/en-us/library/microsoft.visualbasic.applicationservices.windowsformsapplicationbase.minimumsplashscreendisplaytime(VS.85).aspx[^]


          CleaKO

          "Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Thanks. I added a splash screen and a form to my project, set the splash screen in the project's properties, and added the following code to the ApplicationEvents.vb:

          Protected Overrides Function OnInitialize(ByVal commandLineArgs As _
          System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean
          Me.MinimumSplashScreenDisplayTime = 5000
          Return MyBase.OnInitialize(commandLineArgs)
          End Function

          And it worked correctly. :) The splash screen was shown for 5 seconds. I targed .Net 3.5, too. I'm sure this isn't helpful but I just wanted to confirm for you that the code on that MSDN page did work so you might want to double-check your code.

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups