Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net 在启动屏幕中隐藏默认版本_Vb.net_Winforms_Splash Screen - Fatal编程技术网

Vb.net 在启动屏幕中隐藏默认版本

Vb.net 在启动屏幕中隐藏默认版本,vb.net,winforms,splash-screen,Vb.net,Winforms,Splash Screen,在vb.net上加载程序时,我有一个飞溅显示。 我有一个自定义图像,将显示所有我需要的,所以我想隐藏该程序的默认版本 我有以下代码: Imports System Imports System.Reflection Imports System.Runtime.InteropServices ' General Information about an assembly is controlled through the following ' set of attributes. Chan

在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")> 
导入系统
输入系统。反射
导入System.Runtime.InteropServices
'有关程序集的一般信息通过以下方式控制:
'属性集。更改这些属性值以修改信息
'与程序集关联。
'查看程序集属性的值
'如果此项目向COM公开,则以下GUID用于类型库的ID
'程序集的版本信息由以下四个值组成:
'
主要版本
"小版本",
“建筑编号
"修订",
'
'您可以指定所有值,也可以默认版本号和修订号
'通过使用“*”,如下所示:
'  
我尝试过对
AssemblyVersion
AssemblyFileVersion
进行注释,也尝试过删除它们,但仍然出现


如何隐藏程序的默认版本?

假设您使用SplashForm,您可以执行两件事。您可以删除版本控件和任何其他控件,并删除代码的引用行,也可以将其visible正确设置为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
Private Sub SplashScreen1_Load(ByVal sender作为对象,ByVal e作为System.EventArgs)处理Me.Load
如果My.Application.Info.Title为“”,则
ApplicationTitle.Text=My.Application.Info.Title
其他的
ApplicationTitle.Text=System.IO.Path.GetFileNameWithoutExtension(My.Application.Info.AssemblyName)
如果结束
Version.Text=System.String.Format(Version.Text、My.Application.Info.Version.Major、My.Application.Info.Version.Minor)
'将版本控件可见属性设置为false。
Version.Visible=False
Copyright.Text=My.Application.Info.Copyright
端接头

不要像这样编辑AssemblyInfo.vb文件,这些属性很重要。改为编辑启动屏幕。你可以随意修改它的代码。如果要隐藏显示的版本号,只需将标签的Visible属性设置为False。