2013-08-31 62 views
-2

我在vb.net上的程序加載過程中出現一個啓動畫面。 我有一個自定義的圖像,將顯示所有我需要的,所以我想隱藏程序的默認版本在啓動畫面中隱藏默認版本

我有以下代碼:

Imports System 
Imports System.Reflection 
Imports System.Runtime.InteropServices 

' General Information about an assembly is controlled through the following 
' set of attributes. Change these attribute values to modify the information 
' associated with an assembly. 

' Review the values of the assembly attributes 

<Assembly: AssemblyTitle(" ")> 
<Assembly: AssemblyDescription(" ")> 
<Assembly: AssemblyCompany(" ")> 
<Assembly: AssemblyProduct(" ")> 
<Assembly: AssemblyCopyright(" ")> 
<Assembly: AssemblyTrademark(" ")> 

<Assembly: ComVisible(False)> 

'The following GUID is for the ID of the typelib if this project is exposed to COM 
<Assembly: Guid("bad8ba80-e893-4480-a4b4-5c9a91751386")> 

' Version information for an assembly consists of the following four values: 
' 
'  Major Version 
'  Minor Version 
'  Build Number 
'  Revision 
' 
' You can specify all the values or you can default the Build and Revision Numbers 
' by using the '*' as shown below: 
' <Assembly: AssemblyVersion("1.0.*")> 

<Assembly: AssemblyVersion("0")> 
<Assembly: AssemblyFileVersion(" 0")> 

我試圖評論都AssemblyVersionAssemblyFileVersion,也我試圖刪除它們,但它仍然出現。

如何隱藏程序的默認版本?

+7

不要像這樣編輯AssemblyInfo.vb文件,這些屬性很重要。改爲編輯啓動畫面。無論如何你都可以改變它的代碼。如果要隱藏顯示的版本號,則只需將Label的Visible屬性設置爲False。 –

回答

1

假設你使用了SplashForm,你可以執行兩件事。您可以刪除版本控制和任何其他版本,並刪除引用的代碼行,也可以將它們的可見性設置爲false。

Private Sub SplashScreen1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
    If My.Application.Info.Title <> "" Then 
     ApplicationTitle.Text = My.Application.Info.Title 
    Else 
     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) 
    'Set Version controls visible property to false. 
    Version.Visible = False 

    Copyright.Text = My.Application.Info.Copyright 
End Sub