form1.vb

来自「Visual Basic .NET程序设计教程源代码」· VB 代码 · 共 539 行 · 第 1/3 页

VB
539
字号
Imports System.Windows.Forms


Public Class Form1
    Inherits System.Windows.Forms.Form
    Public Class frmaddressbook
        Inherits Form
        Friend WithEvents cmdfind As Button
        Friend WithEvents cmdadd As Button
        Friend WithEvents cmdupdate As Button
        Friend WithEvents cmdclear As Button
        Friend WithEvents cmdhelp As Button

        Friend WithEvents lblid As Label
        Friend WithEvents lblfirst As Label
        Friend WithEvents lbllast As Label
        Friend WithEvents lbladdress As Label
        Friend WithEvents lblcity As Label
        Friend WithEvents lblstate As Label
        Friend WithEvents lblzip As Label
        Friend WithEvents lblcountry As Label
        Friend WithEvents lblemail As Label
        Friend WithEvents lblphone As Label
        Friend WithEvents lblfax As Label

        Friend WithEvents txtid As TextBox
        Friend WithEvents txtfirst As TextBox
        Friend WithEvents txtlast As TextBox
        Friend WithEvents txtaddress As TextBox
        Friend WithEvents txtcity As TextBox
        Friend WithEvents txtstate As TextBox
        Friend WithEvents txtzip As TextBox
        Friend WithEvents txtcountry As TextBox
        Friend WithEvents txtemail As TextBox
        Friend WithEvents txtphone As TextBox
        Friend WithEvents txtfax As TextBox

        Friend WithEvents txtstatus As TextBox

        Friend WithEvents addressbookconnection As System.Data.oledb.OleDbConnection
        Friend WithEvents addressbookdataadapter As System.Data.OleDb.OleDbDataAdapter
        Friend WithEvents addressbookdataset As System.Data.DataSet
    End Class
    Public Sub New()
        MyBase.New()
        InitializeComponent()
        addressbookconnection.Open()
    End Sub

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

    Public Sub New()
        MyBase.New()

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

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

    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 cmdfind As System.Windows.Forms.Button
    Friend WithEvents cmdadd As System.Windows.Forms.Button
    Friend WithEvents cmdupdate As System.Windows.Forms.Button
    Friend WithEvents cmdclear As System.Windows.Forms.Button
    Friend WithEvents cmdhelp As System.Windows.Forms.Button
    Friend WithEvents lblid As System.Windows.Forms.Label
    Friend WithEvents lblfirst As System.Windows.Forms.Label
    Friend WithEvents lbllast As System.Windows.Forms.Label
    Friend WithEvents lbladdress As System.Windows.Forms.Label
    Friend WithEvents lblcity As System.Windows.Forms.Label
    Friend WithEvents lblstate As System.Windows.Forms.Label
    Friend WithEvents lblzip As System.Windows.Forms.Label
    Friend WithEvents lblcountry As System.Windows.Forms.Label
    Friend WithEvents lblemail As System.Windows.Forms.Label
    Friend WithEvents lblphone As System.Windows.Forms.Label
    Friend WithEvents lblfax As System.Windows.Forms.Label
    Friend WithEvents txtid As System.Windows.Forms.TextBox
    Friend WithEvents txtfirst As System.Windows.Forms.TextBox
    Friend WithEvents txtlast As System.Windows.Forms.TextBox
    Friend WithEvents txtaddress As System.Windows.Forms.TextBox
    Friend WithEvents txtcity As System.Windows.Forms.TextBox
    Friend WithEvents txtstate As System.Windows.Forms.TextBox
    Friend WithEvents txtzip As System.Windows.Forms.TextBox
    Friend WithEvents txtcountry As System.Windows.Forms.TextBox
    Friend WithEvents txtemail As System.Windows.Forms.TextBox
    Friend WithEvents txtphone As System.Windows.Forms.TextBox
    Friend WithEvents txtfax As System.Windows.Forms.TextBox
    Friend WithEvents txtstatus As System.Windows.Forms.TextBox
    Friend WithEvents OleDbDataAdapter1 As System.Data.OleDb.OleDbDataAdapter
    Friend WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbInsertCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbUpdateCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbDeleteCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents addressbookconnection As System.Data.OleDb.OleDbConnection
    Friend WithEvents Addressbookdataset1 As ex1204.addressbookdataset
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.cmdfind = New System.Windows.Forms.Button
        Me.cmdadd = New System.Windows.Forms.Button
        Me.cmdupdate = New System.Windows.Forms.Button
        Me.cmdclear = New System.Windows.Forms.Button
        Me.cmdhelp = New System.Windows.Forms.Button
        Me.lblid = New System.Windows.Forms.Label
        Me.lblfirst = New System.Windows.Forms.Label
        Me.lbllast = New System.Windows.Forms.Label
        Me.lbladdress = New System.Windows.Forms.Label
        Me.lblcity = New System.Windows.Forms.Label
        Me.lblstate = New System.Windows.Forms.Label
        Me.lblzip = New System.Windows.Forms.Label
        Me.lblcountry = New System.Windows.Forms.Label
        Me.lblemail = New System.Windows.Forms.Label
        Me.lblphone = New System.Windows.Forms.Label
        Me.lblfax = New System.Windows.Forms.Label
        Me.txtid = New System.Windows.Forms.TextBox
        Me.txtfirst = New System.Windows.Forms.TextBox
        Me.txtlast = New System.Windows.Forms.TextBox
        Me.txtaddress = New System.Windows.Forms.TextBox
        Me.txtcity = New System.Windows.Forms.TextBox
        Me.txtstate = New System.Windows.Forms.TextBox
        Me.txtzip = New System.Windows.Forms.TextBox
        Me.txtcountry = New System.Windows.Forms.TextBox
        Me.txtemail = New System.Windows.Forms.TextBox
        Me.txtphone = New System.Windows.Forms.TextBox
        Me.txtfax = New System.Windows.Forms.TextBox
        Me.txtstatus = New System.Windows.Forms.TextBox
        Me.addressbookconnection = New System.Data.OleDb.OleDbConnection
        Me.OleDbDataAdapter1 = New System.Data.OleDb.OleDbDataAdapter
        Me.OleDbDeleteCommand1 = New System.Data.OleDb.OleDbCommand
        Me.OleDbInsertCommand1 = New System.Data.OleDb.OleDbCommand
        Me.OleDbSelectCommand1 = New System.Data.OleDb.OleDbCommand
        Me.OleDbUpdateCommand1 = New System.Data.OleDb.OleDbCommand
        Me.Addressbookdataset1 = New ex1204.addressbookdataset
        CType(Me.Addressbookdataset1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'cmdfind
        '
        Me.cmdfind.Location = New System.Drawing.Point(0, 0)
        Me.cmdfind.Name = "cmdfind"
        Me.cmdfind.TabIndex = 0
        Me.cmdfind.Text = "查找"
        '
        'cmdadd
        '
        Me.cmdadd.Location = New System.Drawing.Point(80, 0)
        Me.cmdadd.Name = "cmdadd"
        Me.cmdadd.TabIndex = 1
        Me.cmdadd.Text = "添加"
        '
        'cmdupdate
        '
        Me.cmdupdate.Location = New System.Drawing.Point(160, 0)
        Me.cmdupdate.Name = "cmdupdate"
        Me.cmdupdate.TabIndex = 2
        Me.cmdupdate.Text = "更新"
        '
        'cmdclear
        '
        Me.cmdclear.Location = New System.Drawing.Point(240, 0)
        Me.cmdclear.Name = "cmdclear"
        Me.cmdclear.TabIndex = 3
        Me.cmdclear.Text = "清除"
        '
        'cmdhelp

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?