错误“应用程序不是我的成员” [英] Error "Application is not a member of My"

查看:80
本文介绍了错误“应用程序不是我的成员”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在我的vb.net项目中添加了一个启动画面,现在当我尝试运行它时它会给我一个错误。下面是错误来自的代码。我试图从命令提示符运行devenv.exe / resetsettings但失败了,我试图改变.vbpro文件没有pad但是找不到命名空间来执行此操作,在属性窗口中我无法勾选启用应用程序框架属性

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

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

推荐答案

取我的。咬掉......

Take the "My." bit off...
If Not String.IsNullOrEmpty(Application.Info.Title) Then
ApplicationTitle.Text = Application.Info.Title

也不要忘记其他的!


感谢您的帮助我通过更改.vbproj文件来解决它



< mytype>清空至< mytype> WindowsForms
THAK you for your help everyone i finally solved it by changing the .vbproj file where it says

<mytype>Empty to <mytype>WindowsForms


这篇关于错误“应用程序不是我的成员”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆