airsam

I have a splash screen, and I want a progress bar to fill as the program loads, how do I do this

Thank you.


Re: Visual Basic Express Edition Splash Screen Progress Bar

Omar Abid

This depends on your need

Do u have thread to execute or data to load when showing the Splash screen






Re: Visual Basic Express Edition Splash Screen Progress Bar

airsam

The splash screen shows whilst the application is loading -

I created the splash screen (Project > New Item > Splash Screen)

Then went Project > Properties > Splash Screen > (Selected SplashScreen1)

Thank you




Re: Visual Basic Express Edition Splash Screen Progress Bar

Omar Abid

Yes I know that but while displaying the splash screen do u have data or thread to start or load

Or you don't






Re: Visual Basic Express Edition Splash Screen Progress Bar

airsam

I dont know. The first form just loads normally, but there is a splash screen while it loads. How do I find out




Re: Visual Basic Express Edition Splash Screen Progress Bar

Omar Abid

So why you want to make the Progress Bar






Re: Visual Basic Express Edition Splash Screen Progress Bar

airsam

To show the progress of the splash screen.
I want the progress bar to fill as the application loads.

Thank you




Re: Visual Basic Express Edition Splash Screen Progress Bar

Kingy_Owl

If you just want a visual progress bar that doesnt really load anything on the splash screen, use a timer.

Private Sub frmSplash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Timer1.Start()

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

'Add to the progress bar whenever the timer ticks

ProgressBarLoadApp.Value = ProgressBarLoadApp.Value + 20

End Sub





Re: Visual Basic Express Edition Splash Screen Progress Bar

Omar Abid

Just adding the interval to your post

Code Snippet

Private Sub frmSplash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

' Specify an interval here

Timer1.interval = 100 ' 1 second

Timer1.Start()

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

'Add to the progress bar whenever the timer ticks

ProgressBarLoadApp.Value = ProgressBarLoadApp.Value + 20

End Sub







Re: Visual Basic Express Edition Splash Screen Progress Bar

airsam

So how do I do it it timing with the splash screen load




Re: Visual Basic Express Edition Splash Screen Progress Bar

Omar Abid

Splash Screen timing is constant (I think 5 second)






Re: Visual Basic Express Edition Splash Screen Progress Bar

Omar Abid

For your case it'll be approximatly

Code Snippet

Private Sub frmSplash_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

' Specify an interval here

Timer1.interval = 50 ' 1 second

Timer1.Start()

End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

'Add to the progress bar whenever the timer ticks

ProgressBarLoadApp.Value = ProgressBarLoadApp.Value + 10

End Sub






Re: Visual Basic Express Edition Splash Screen Progress Bar

js06

To make this a little easier, you could just set the progressbar style to Marquee

Then it will just give them something to look at while it loads