Using a Splash Screen from an External Assembly in Visual Basic 2005

Published on: Author: Rob Windsor Leave a comment

This issue came up on one of email lists I’m involved in and I though the solution was worth sharing. The developer wanted to know how to use a splash screen from an external assembly (i.e. a DLL) in a Visual Basic 2005 Windows application. If you look at the Applications tab of the project properties, there is dropdown to pick the splash screen but it will only show forms in the current project.


Application Framework Screenshot


To use a splash screen from an external assembly click the View Application Events button to get the partial class for the application and then override the OnCreateSplashScreen method. The code should look something like this.


   19 Partial Friend Class MyApplication

   20     <Global.System.Diagnostics.DebuggerStepThroughAttribute()> _

   21     Protected Overrides Sub OnCreateSplashScreen()

   22         Me.SplashScreen = New ClassLibrary1.SplashScreen1()

   23     End Sub

   24 End Class


 




Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>