Change Startup minimum time

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Infog
    New Member
    • Dec 2008
    • 36

    Change Startup minimum time

    I was unable to get these instructions to work:


    When pasting in the code below, I get an message that says "Statement is not valid in a namespace".

    I am using .NET 3.5 for my program, and the code came from: http://msdn.microsoft.com/en-us/libr...splaytime.aspx

    Code:
    Protected Overrides Function OnInitialize( _
        ByVal commandLineArgs As _
        System.Collections.ObjectModel.ReadOnlyCollection(Of String) _
    ) As Boolean
        ' Set the display time to 5000 milliseconds (5 seconds). 
        Me.MinimumSplashScreenDisplayTime = 5000
        Return MyBase.OnInitialize(commandLineArgs)
    End Function
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    When I try your line 3 in C# it wants <> not () but that might be a language syntax difference. I don't do VB
    Code:
    System.Collections.ObjectModel.ReadOnlyCollection<>
    It might help to know which line VS is breaking on to give you that error message

    Comment

    • Infog
      New Member
      • Dec 2008
      • 36

      #3
      The message is given for
      Code:
      Protected Overrides Function OnInitialize( _
          ByVal commandLineArgs As  _
          System.Collections.ObjectModel.ReadOnlyCollection(Of String) _
      ) As Boolean
      Oh, and as a note, this code is in ApplicationEven ts.vb

      Comment

      • Infog
        New Member
        • Dec 2008
        • 36

        #4
        (woops... how do I delete a post....)

        Comment

        • blowdoof
          New Member
          • Mar 2009
          • 7

          #5
          have you put the function within a class? or right beneath the namespace definition? make sure it's within your class statement..(Par tial Friend Class MyApplication)

          Comment

          Working...