Click here to Skip to main content
15,885,032 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: SplashScreen Pin
WestSideRailways24-Feb-07 15:36
WestSideRailways24-Feb-07 15:36 
GeneralRe: SplashScreen Pin
Dave Kreskowiak24-Feb-07 16:57
mveDave Kreskowiak24-Feb-07 16:57 
GeneralRe: SplashScreen Pin
WestSideRailways24-Feb-07 17:23
WestSideRailways24-Feb-07 17:23 
GeneralRe: SplashScreen Pin
Dave Kreskowiak25-Feb-07 5:42
mveDave Kreskowiak25-Feb-07 5:42 
AnswerRe: SplashScreen Pin
Christian Graus24-Feb-07 16:24
protectorChristian Graus24-Feb-07 16:24 
GeneralRe: SplashScreen Pin
WestSideRailways24-Feb-07 17:14
WestSideRailways24-Feb-07 17:14 
GeneralRe: SplashScreen Pin
Christian Graus25-Feb-07 8:57
protectorChristian Graus25-Feb-07 8:57 
AnswerRe: SplashScreen Pin
TwoFaced24-Feb-07 17:46
TwoFaced24-Feb-07 17:46 
By my calculations your splash screen should stay up for approximatly 56 seconds. That can't possibly be what you intended. Anyway based on your code and description I would say you added a form to your project and selected 'splash screen'. This doesn't mean your application will start with a splash screen. In order for your application to start with the splash screen you need to set that form as your splash screen. To do that you'll need to go to the project properties and under the Application tab you should see 'Splash Screen' with a dropdown to select the desired form. You may have already done that but I couldn't tell if your form was displaying at all. However if you've gotten that far your form will still dissapear once form1 is loaded and the minimum display time has been met, whichever comes second. Since I get the impression your splash screen is simply ornamental I would just pick a time you want it to display. You can set the minimum time in the splash screens 'New' constructor. Use a timer to update the progess bar. The value will be the percentage of time elapsed * 100. So if you want to display for 3 seconds and the elapsed time is 2 secnods the value would be 66. Here's an example of what I mean.
Public NotInheritable Class SplashScreen1
    'Minimum time in seconds to show this splash screen
    Private Const DisplayTime As Integer = 5

    WithEvents tmr As New Timer
    Dim sw As New Stopwatch         'Stopwatch to track time since shown

    Public Sub New()
        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        'Set minimum time to display
        My.Application.MinimumSplashScreenDisplayTime = DisplayTime * 1000
        'Update progress every 10/1000 sec
        tmr.Interval = 10
    End Sub

    Private Sub tmr_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmr.Tick
        'Calculate value for progess bar
        Dim elapsed As Integer = (sw.ElapsedMilliseconds / (DisplayTime * 1000)) * 100
        If elapsed > 100 Then elapsed = 100
        ProgressBar1.Value = elapsed
    End Sub

    Private Sub SplashScreen1_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
        sw.Start()      'Begin stopwatch
        tmr.Start()     'Start timer
    End Sub
End Class

GeneralRe: SplashScreen Pin
WestSideRailways24-Feb-07 18:33
WestSideRailways24-Feb-07 18:33 
Questionupdate doesnt save into table using vb.net Pin
7prince24-Feb-07 9:53
7prince24-Feb-07 9:53 
AnswerRe: update doesnt save into table using vb.net Pin
Dave Kreskowiak24-Feb-07 11:42
mveDave Kreskowiak24-Feb-07 11:42 
Questiontree view Pin
manni_n24-Feb-07 7:28
manni_n24-Feb-07 7:28 
AnswerRe: tree view Pin
MatrixCoder24-Feb-07 9:12
MatrixCoder24-Feb-07 9:12 
QuestionOleDB error Pin
7prince24-Feb-07 6:31
7prince24-Feb-07 6:31 
AnswerRe: OleDB error Pin
Dave Kreskowiak24-Feb-07 12:12
mveDave Kreskowiak24-Feb-07 12:12 
Questioninsert text data into database (SQL 2005) Pin
lyzaa24-Feb-07 5:22
lyzaa24-Feb-07 5:22 
AnswerRe: insert text data into database (SQL 2005) Pin
TriGiggleMich24-Feb-07 7:48
TriGiggleMich24-Feb-07 7:48 
GeneralRe: insert text data into database (SQL 2005) Pin
lyzaa25-Feb-07 16:37
lyzaa25-Feb-07 16:37 
QuestionRegEx to replace a string [modified] Pin
T John24-Feb-07 3:40
T John24-Feb-07 3:40 
AnswerRe: RegEx to replace a string Pin
The Tigerman24-Feb-07 13:17
The Tigerman24-Feb-07 13:17 
GeneralRe: RegEx to replace a string Pin
T John25-Feb-07 4:36
T John25-Feb-07 4:36 
QuestionHow do you open an Access Query in Excel using a vb button? Pin
China-Gary24-Feb-07 2:09
China-Gary24-Feb-07 2:09 
QuestionCan a form have a scroll bar? Pin
steve_rm24-Feb-07 1:35
steve_rm24-Feb-07 1:35 
AnswerRe: Can a form have a scroll bar? Pin
JUNEYT24-Feb-07 2:10
JUNEYT24-Feb-07 2:10 
AnswerRe: Can a form have a scroll bar? Pin
manni_n24-Feb-07 2:22
manni_n24-Feb-07 2:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.