2013-08-28 2 views
0

Я получаю эту ошибку, когда пытаюсь запустить приложение «Приложение не является членом My», я недавно добавил заставку, эта ошибка исходит из код ниже. Я попытался запустить devenv.exe/resetsetting из командной строки, чтобы включить среду приложения и ее работу. кто-нибудь с более простым методом решения этого будет понятноЗаставка Заставка «Приложение не является членом My»

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 
+1

Вы пытались удалить «Мой»? –

+0

Просто из любопытства, зачем использовать 'If True Then'? –

ответ

1

В свойствах проекта пытаются установить форму запуска на главную форму и нажмите включить фреймворка. Затем вы должны установить SplashScreen в качестве заставки. Убедитесь, что у вас есть код следующим образом:

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 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 

    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 Sub 
+0

Спасибо всем за помощь, я решил это, открыв файл project.vbproj с помощью блокнота и отредактировал: Пустой до WindowsForm

Смежные вопросы