📄 aboutform.vb
字号:
'---------------------------------------------------------------------
' This file is part of the Microsoft .NET Framework SDK Code Samples.
'
' Copyright (C) Microsoft Corporation. All rights reserved.
'
' This source code is intended only as a supplement to Microsoft
' Development Tools and/or on-line documentation. See these other
' materials for detailed information regarding Microsoft code samples.
'
' THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
' KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
' IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
' PARTICULAR PURPOSE.
'---------------------------------------------------------------------
Imports System.Reflection
Imports System.Diagnostics
Imports System.IO
Public Class AboutForm
Private Sub AboutForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
' get assembly info not available from application object
Dim copyright As AssemblyCopyrightAttribute = CType(AssemblyCopyrightAttribute.GetCustomAttribute(Reflection.Assembly.GetExecutingAssembly(), GetType(AssemblyCopyrightAttribute)), AssemblyCopyrightAttribute)
Dim description As AssemblyDescriptionAttribute = CType(AssemblyDescriptionAttribute.GetCustomAttribute(System.Reflection.Assembly.GetExecutingAssembly(), GetType(AssemblyDescriptionAttribute)), AssemblyDescriptionAttribute)
' set labels
lblDescription.Text = description.Description
lblVersion.Text = "Version: " & Application.ProductVersion
lblCopyright.Text = copyright.Copyright
' set links
lnkArkitech.Links(0).LinkData = "http://www.arkitechebc.com/"
linkVB.Links(0).LinkData = "http://msdn.microsoft.com/vbasic/"
linkCompany.Links(0).LinkData = "http://www.vertigosoftware.com/"
' display components used by this assembly
Dim assemComponents As AssemblyName() = [Assembly].GetExecutingAssembly().GetReferencedAssemblies()
Dim assemName As AssemblyName
For Each assemName In assemComponents
Dim item As ListViewItem = listComponents.Items.Add(assemName.Name)
item.SubItems.Add(assemName.Version.ToString())
Next assemName
End Sub
Private Sub butOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butOK.Click
Me.Close()
End Sub
Private Sub butInfo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butInfo.Click
Try
System.Diagnostics.Process.Start("MSInfo32.exe")
Catch
End Try
End Sub
Private Sub linkCompany_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles linkCompany.LinkClicked
Try
' launch the url, this will fail if user does not have an association for url's
System.Diagnostics.Process.Start(CStr(e.Link.LinkData))
Catch
End Try
End Sub
Private Sub linkVB_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles linkVB.LinkClicked
Try
' launch the url, this will fail if user does not have an association for url's
System.Diagnostics.Process.Start(CStr(e.Link.LinkData))
Catch
End Try
End Sub
Private Sub lnkArkitech_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles lnkArkitech.LinkClicked
System.Diagnostics.Process.Start(CStr(e.Link.LinkData))
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -