all groups > dotnet compact framework > october 2004 >
You're in the

dotnet compact framework

group:

timer/progress bar on splash screen


timer/progress bar on splash screen Mankow
10/28/2004 6:35:01 AM
dotnet compact framework:
Hi,
When my app starts, it reads in a few text files. During this processing I
would like to display a progress bar. However when I put the call to do the
processing in the startup form's load event, the form is not yet visible, so
no progress bar. I assume the processing code needs to go in another place.
But how to call it? Do I need a timer? Do I need a "Main"?
Thanks,
Re: timer/progress bar on splash screen Mankow
10/28/2004 10:19:01 AM
Hi Jon,
I tried your technique...couple of questions

[quoted text, click to view]
The compiler does not recognize Forms.SplashScreen, so I did this instead:
Dim frmSplash as New Form

I stepped throught the code, when this line executes
frmSplash.Show()
the splash screen does not show.
the rest of the program continues on, and my main screen launches.
Is there a particular property I need to set on the splash screen form?
Thanks,
Re: timer/progress bar on splash screen Jon Brunson
10/28/2004 2:50:35 PM
[quoted text, click to view]

This is the way we do it, put this method in any class (we call ours
EntryPoint) and set up the project to run this method as the startup object

[VB.NET]

Public Shared Sub Main()

Dim frmSplash As New Forms.SplashScreen
frmSplash.Show()

Try
' load youre files here

Catch ex As Exception
frmSplash.Close()
MessageBox.Show(ex.Message, "Error Loading", MessageBoxButtons.OK,
MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1)
Return

End Try

' initialize the main form BEFORE closing the splash screen
Dim frmMain As New Forms.Main
frmSplash.Close()

Application.Run(frmMain)

End Sub
Re: timer/progress bar on splash screen Glyn Meek
10/31/2004 4:41:03 PM
How are you updating the progress bar value during the file load process?




[quoted text, click to view]

AddThis Social Bookmark Button