My FAQ,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 程序开发 > 编程语言 > .NET > 临时文章
一个通用的类似微软产品的About
作者:未知 时间:2004-11-13 12:12 出处:Blog 责编:MyFAQ
              摘要:暂无

效果


项目的AssemblyInfo.vb内容

Imports System.Reflection

<Assembly: AssemblyTitle("水如烟管理系统")>

<Assembly: AssemblyDescription("补充原有功能,以查询和输出报表为主" & microsoft.VisualBasic.ControlChars.crlf & "具体对数据的操作还是在DOS系统下的FOXPRO 2.6版管理系统")>

<Assembly: AssemblyCompany("")>

<Assembly: AssemblyProduct("")>

<Assembly: AssemblyCopyright("Copyright (C) 2003 LzmTW")>

<Assembly: CLSCompliant(True)>

<Assembly: AssemblyVersion("1.0.0.0")>

 

在程序主界面中调用方法:

    Private Sub AboutMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AboutMenuItem.Click

        Dim FrmAbout As New LzmTW.About.AboutForm(Me)

        FrmAbout.AboutInfo.Image = Image.FromFile(Application.StartupPath & "\..\sea.jpg")

        FrmAbout.InitAboutInfo()

        FrmAbout.ShowDialog()

    End Sub

以下是About

 

Imports System.Diagnostics

Imports System.Reflection

Namespace LzmTW.About  '参考者,请保持本引用空间名称

    Public Class AboutForm

        Inherits System.Windows.Forms.Form

 

#Region " Windows 窗体设计器生成的代码 "

 

        Public Sub New(ByVal MainForm As Form)

            MyBase.New()

 

            '该调用是 Windows 窗体设计器所必需的。

            InitializeComponent()

 

            ' InitializeComponent() 调用之后添加任何初始化

            m_AboutInfo = New AboutInfo(MainForm)

            m_AboutInfo.Icon = MainForm.Icon

            '更新界面

            InitAboutInfo()

        End Sub

 

        '窗体重写 dispose 以清理组件列表。

        Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)

            If disposing Then

                If Not (components Is Nothing) Then

                    components.Dispose()

                End If

            End If

            MyBase.Dispose(disposing)

        End Sub

 

        'Windows 窗体设计器所必需的

        Private components As System.ComponentModel.IContainer

 

        '注意: 以下过程是 Windows 窗体设计器所必需的

        '可以使用 Windows 窗体设计器修改此过程。

        '不要使用代码编辑器修改它。

        Friend WithEvents ProductLabel As System.Windows.Forms.Label

        Friend WithEvents Label1 As System.Windows.Forms.Label

        Friend WithEvents Label2 As System.Windows.Forms.Label

        Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader

        Friend WithEvents ColumnHeader2 As System.Windows.Forms.ColumnHeader

        Friend WithEvents Label3 As System.Windows.Forms.Label

        Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox

        Friend WithEvents OKButton As System.Windows.Forms.Button

        Friend WithEvents SystemInfoButton As System.Windows.Forms.Button

        Friend WithEvents AlarmLabel As System.Windows.Forms.Label

        Friend WithEvents ImagePictureBox As System.Windows.Forms.PictureBox

        Friend WithEvents UserTextBox As System.Windows.Forms.TextBox

        Friend WithEvents AssemblyListView As System.Windows.Forms.ListView

        Friend WithEvents ICOPictureBox As System.Windows.Forms.PictureBox

        Friend WithEvents DescriptionTextBox As System.Windows.Forms.TextBox

        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()

            Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(AboutForm))

            Me.ImagePictureBox = New System.Windows.Forms.PictureBox

            Me.ProductLabel = New System.Windows.Forms.Label

            Me.Label1 = New System.Windows.Forms.Label

            Me.UserTextBox = New System.Windows.Forms.TextBox

            Me.Label2 = New System.Windows.Forms.Label

            Me.AssemblyListView = New System.Windows.Forms.ListView

            Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader

            Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader

            Me.Label3 = New System.Windows.Forms.Label

            Me.ICOPictureBox = New System.Windows.Forms.PictureBox

            Me.DescriptionTextBox = New System.Windows.Forms.TextBox

            Me.GroupBox1 = New System.Windows.Forms.GroupBox

            Me.OKButton = New System.Windows.Forms.Button

            Me.SystemInfoButton = New System.Windows.Forms.Button

            Me.AlarmLabel = New System.Windows.Forms.Label

            Me.SuspendLayout()

            '

            'ImagePictureBox

            '

            Me.ImagePictureBox.Location = New System.Drawing.Point(8, 8)

            Me.ImagePictureBox.Name = "ImagePictureBox"

            Me.ImagePictureBox.Size = New System.Drawing.Size(88, 272)

            Me.ImagePictureBox.TabIndex = 0

            Me.ImagePictureBox.TabStop = False

            '

            'ProductLabel

            '

            Me.ProductLabel.Location = New System.Drawing.Point(104, 16)

            Me.ProductLabel.Name = "ProductLabel"

            Me.ProductLabel.Size = New System.Drawing.Size(400, 40)

            Me.ProductLabel.TabIndex = 1

            '

            'Label1

            '

            Me.Label1.Location = New System.Drawing.Point(104, 60)

            Me.Label1.Name = "Label1"

            Me.Label1.Size = New System.Drawing.Size(168, 16)

            Me.Label1.TabIndex = 3

            Me.Label1.Text = "本产品使用权属于:"

            '

            'UserTextBox

            '

            Me.UserTextBox.BackColor = System.Drawing.SystemColors.Control

            Me.UserTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle

            Me.UserTextBox.Enabled = False

            Me.UserTextBox.Location = New System.Drawing.Point(104, 76)

            Me.UserTextBox.Multiline = True

            Me.UserTextBox.Name = "UserTextBox"

            Me.UserTextBox.ReadOnly = True

            Me.UserTextBox.Size = New System.Drawing.Size(400, 32)

            Me.UserTextBox.TabIndex = 4

            Me.UserTextBox.Text = ""

            '

            'Label2

            '

            Me.Label2.Location = New System.Drawing.Point(104, 112)

            Me.Label2.Name = "Label2"

            Me.Label2.Size = New System.Drawing.Size(120, 16)

            Me.Label2.TabIndex = 5

            Me.Label2.Text = "引用程序集:"

            '

            'AssemblyListView

            '

            Me.AssemblyListView.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2})

            Me.AssemblyListView.Location = New System.Drawing.Point(104, 128)

            Me.AssemblyListView.Name = "AssemblyListView"

            Me.AssemblyListView.Size = New System.Drawing.Size(400, 80)

            Me.AssemblyListView.TabIndex = 6

            Me.AssemblyListView.View = System.Windows.Forms.View.Details

            '

            'ColumnHeader1

            '

            Me.ColumnHeader1.Text = "项目"

            Me.ColumnHeader1.Width = 150

            '

            'ColumnHeader2

            '

            Me.ColumnHeader2.Text = "版本"

            Me.ColumnHeader2.Width = 150

            '

            'Label3

            '

            Me.Label3.Location = New System.Drawing.Point(104, 216)

            Me.Label3.Name = "Label3"

            Me.Label3.Size = New System.Drawing.Size(96, 16)

            Me.Label3.TabIndex = 7

            Me.Label3.Text = "产品详细信息:"

            '

            'ICOPictureBox

            '

            Me.ICOPictureBox.Location = New System.Drawing.Point(104, 240)

            Me.ICOPictureBox.Name = "ICOPictureBox"

            Me.ICOPictureBox.Size = New System.Drawing.Size(40, 32)