4

Is it possible to show a splash screen in WPF that has animation. I want my name of the company and the name of the application to fly in and a progress bar that continously animates. I Used this example

http://blogs.lessthandot.com/index.php/DesktopDev/MSTech/wpf-and-the-splashscreen

to try and get me started but the progress bar doesnt animate?

Also I do have on the progress bar the following property set. IsIndeterminate="True"

I am using vb.net.

Thanks, spafa9

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96
Spafa9
  • 742
  • 3
  • 14
  • 30
  • The blog post you linked looks like it has everything you need. Does your animation work if you copy it to a new Window in a new project? Do you get any errors? Do you have the splash screen correctly showing up and the only issue is the animation does not play? – Nate Sep 09 '10 at 14:56
  • Yes I put it in a new project and just copied the code. The only thing I couldnt get to work was the Private Sub Application_Exit(ByVal sender As Object, ByVal e As System.Windows.ExitEventArgs) Handles Me.Exit ' Container.DisposeAll() End Sub Everything comes up right it show it and then shows the main form but doesnt animate. – Spafa9 Sep 09 '10 at 15:25

1 Answers1

1

See my answer at the bottom of this question: Multi-threaded splash screen in C#?

This is in C#, but it does work with an animated indeterminate progress bar.

Community
  • 1
  • 1
Jay
  • 56,361
  • 10
  • 99
  • 123
  • How do I referance the – Spafa9 Sep 09 '10 at 15:32
  • The part I dont know how to convert to vb is this – Spafa9 Sep 09 '10 at 15:40
  • var thread = new Thread(() => { Dispatcher.CurrentDispatcher.BeginInvoke ((Action)(() => new MySplashForm().Show())); Dispatcher.Run(); }); – Spafa9 Sep 09 '10 at 15:49
  • OK I got a litte farther. The splash screen never shows up but the mainwindow does? Dim SplashThread As New Thread(AddressOf ShowSplash) SplashThread.SetApartmentState(ApartmentState.STA) SplashThread.IsBackground = True SplashThread.Start() ' call synchronous configuration process ' and declare/get reference to "main form" SplashThread.Abort() MainWindow = New MainWindow() MainWindow.Show() MainWindow.Activate() – Spafa9 Sep 09 '10 at 15:51