Click here to Skip to main content
15,921,989 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i recently added a splash screen to my vb.net project and now it give me an error when i try to run it. below is the code where the error is coming from. I have tried to run devenv.exe/resetsettings from command prompt but failed, i tried to change the .vbpro file with not pad but can't find the namespace to do that, in the propertities window i can't tick the enable application framework property
VB
Imports System.Windows.Forms
Public NotInheritable Class SplashScreen1

'TODO: This form can easily be set as the splash screen for the application by going to the "Application" tab
' of the Project Designer ("Properties" under the "Project" menu).


Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Set up the dialog text at runtime according to the application's assembly information. 

'TODO: Customize the application's assembly information in the "Application" pane of the project 
' properties dialog (under the "Project" menu).

'Application title

If True Then
If Not String.IsNullOrEmpty(My.Application.Info.Title) Then
ApplicationTitle.Text = My.Application.Info.Title
Else
'If the application title is missing, use the application name, without the extension
ApplicationTitle.Text = System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
End If

'Format the version information using the text set into the Version control at design time as the
' formatting string. This allows for effective localization if desired.
' Build and revision information could be included by using the following code and changing the 
' Version control's designtime text to "Version {0}.{1:00}.{2}.{3}" or something similar. See
' String.Format() in Help for more information.
'
' Version.Text = System.String.Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor, My.Application.Info.Version.Build, My.Application.Info.Version.Revision)

Version.Text = System.[String].Format(Version.Text, My.Application.Info.Version.Major, My.Application.Info.Version.Minor)

'Copyright info
Copyright.Text = My.Application.Info.Copyright
End If
End Sub

End Class
Posted
Updated 28-Aug-13 0:09am
v2

THAK you for your help everyone i finally solved it by changing the .vbproj file where it says

<mytype>Empty to <mytype>WindowsForms
 
Share this answer
 
Take the "My." bit off...
VB
If Not String.IsNullOrEmpty(Application.Info.Title) Then
ApplicationTitle.Text = Application.Info.Title
Don't forget the other ones as well!
 
Share this answer
 
Comments
muneebalikiyani 29-Aug-13 2:56am    
+5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900