我在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")>
我已尝试对AssemblyVersion
和AssemblyFileVersion
进行评论,我也尝试删除它们,但它仍会显示。
如何隐藏程序的默认版本?
答案 0 :(得分: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