📄 bindingdemoform8.vb
字号:
' 导入命名空间
Imports System.Data.SqlClient
Public Class BindingDemoForm8
Inherits System.Windows.Forms.Form
' 数据集对象的类层级建立
Dim ds As DataSet = New DataSet()
' CurrencyManager 对象的类层级声明
Dim bmFoxStudio As BindingManagerBase
' 定义一个内含 EveryDepartment 对象的数组来作为 ComboBox 控件的数据源
Dim AllDepartments() As EveryDepartment = New EveryDepartment() { _
New EveryDepartment("生产制造部") _
, New EveryDepartment("行销部") _
, New EveryDepartment("财务部") _
, New EveryDepartment("会计部") _
, New EveryDepartment("业务部") _
, New EveryDepartment("信息部")}
#Region " Windows Form 设计工具产生的程序代码 "
Public Sub New()
MyBase.New()
'此调用为 Windows Form 设计工具的必要项。
InitializeComponent()
'在 InitializeComponent() 调用之后加入所有的初始设定
End Sub
'Form 覆盖 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 Form 设计工具的必要项
Private components As System.ComponentModel.IContainer
'注意: 以下为 Windows Form 设计工具所需的程序
'您可以使用 Windows Form 设计工具进行修改。
'请勿使用程序代码编辑器来修改这些程序。
Friend WithEvents lblHeader As System.Windows.Forms.Label
Friend WithEvents btnEnd As System.Windows.Forms.Button
Friend WithEvents btnNext As System.Windows.Forms.Button
Friend WithEvents btnBack As System.Windows.Forms.Button
Friend WithEvents btnFirst As System.Windows.Forms.Button
Friend WithEvents TextBoxPosition As System.Windows.Forms.TextBox
Friend WithEvents NumericUpDownSalary As System.Windows.Forms.NumericUpDown
Friend WithEvents lblContent As System.Windows.Forms.Label
Friend WithEvents TextBoxContent As System.Windows.Forms.TextBox
Friend WithEvents DateTimePickerBirthday As System.Windows.Forms.DateTimePicker
Friend WithEvents CheckBoxGender As System.Windows.Forms.CheckBox
Friend WithEvents lblDepartment As System.Windows.Forms.Label
Friend WithEvents lblSalary As System.Windows.Forms.Label
Friend WithEvents lblBirthday As System.Windows.Forms.Label
Friend WithEvents lblAddress As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents lblName As System.Windows.Forms.Label
Friend WithEvents lblID As System.Windows.Forms.Label
Friend WithEvents TextBoxAddress As System.Windows.Forms.TextBox
Friend WithEvents TextBoxName As System.Windows.Forms.TextBox
Friend WithEvents TextBoxID As System.Windows.Forms.TextBox
Friend WithEvents ComboBoxDepartment As System.Windows.Forms.ComboBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(BindingDemoForm8))
Me.lblHeader = New System.Windows.Forms.Label
Me.btnEnd = New System.Windows.Forms.Button
Me.btnNext = New System.Windows.Forms.Button
Me.btnBack = New System.Windows.Forms.Button
Me.btnFirst = New System.Windows.Forms.Button
Me.TextBoxPosition = New System.Windows.Forms.TextBox
Me.NumericUpDownSalary = New System.Windows.Forms.NumericUpDown
Me.lblContent = New System.Windows.Forms.Label
Me.TextBoxContent = New System.Windows.Forms.TextBox
Me.DateTimePickerBirthday = New System.Windows.Forms.DateTimePicker
Me.CheckBoxGender = New System.Windows.Forms.CheckBox
Me.lblDepartment = New System.Windows.Forms.Label
Me.lblSalary = New System.Windows.Forms.Label
Me.lblBirthday = New System.Windows.Forms.Label
Me.lblAddress = New System.Windows.Forms.Label
Me.Label1 = New System.Windows.Forms.Label
Me.lblName = New System.Windows.Forms.Label
Me.lblID = New System.Windows.Forms.Label
Me.TextBoxAddress = New System.Windows.Forms.TextBox
Me.TextBoxName = New System.Windows.Forms.TextBox
Me.TextBoxID = New System.Windows.Forms.TextBox
Me.ComboBoxDepartment = New System.Windows.Forms.ComboBox
CType(Me.NumericUpDownSalary, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'lblHeader
'
Me.lblHeader.AutoSize = True
Me.lblHeader.Font = New System.Drawing.Font("宋体", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
Me.lblHeader.ForeColor = System.Drawing.Color.Red
Me.lblHeader.Location = New System.Drawing.Point(131, 6)
Me.lblHeader.Name = "lblHeader"
Me.lblHeader.Size = New System.Drawing.Size(237, 22)
Me.lblHeader.TabIndex = 81
Me.lblHeader.Text = "使用 ComboBox 控件来编辑数据"
'
'btnEnd
'
Me.btnEnd.Image = CType(resources.GetObject("btnEnd.Image"), System.Drawing.Image)
Me.btnEnd.Location = New System.Drawing.Point(368, 361)
Me.btnEnd.Name = "btnEnd"
Me.btnEnd.Size = New System.Drawing.Size(75, 21)
Me.btnEnd.TabIndex = 80
'
'btnNext
'
Me.btnNext.Image = CType(resources.GetObject("btnNext.Image"), System.Drawing.Image)
Me.btnNext.Location = New System.Drawing.Point(280, 361)
Me.btnNext.Name = "btnNext"
Me.btnNext.Size = New System.Drawing.Size(75, 21)
Me.btnNext.TabIndex = 79
'
'btnBack
'
Me.btnBack.Image = CType(resources.GetObject("btnBack.Image"), System.Drawing.Image)
Me.btnBack.Location = New System.Drawing.Point(192, 361)
Me.btnBack.Name = "btnBack"
Me.btnBack.Size = New System.Drawing.Size(75, 21)
Me.btnBack.TabIndex = 78
'
'btnFirst
'
Me.btnFirst.Image = CType(resources.GetObject("btnFirst.Image"), System.Drawing.Image)
Me.btnFirst.Location = New System.Drawing.Point(96, 361)
Me.btnFirst.Name = "btnFirst"
Me.btnFirst.Size = New System.Drawing.Size(75, 21)
Me.btnFirst.TabIndex = 77
'
'TextBoxPosition
'
Me.TextBoxPosition.BackColor = System.Drawing.Color.FromArgb(CType(255, Byte), CType(255, Byte), CType(192, Byte))
Me.TextBoxPosition.ForeColor = System.Drawing.Color.FromArgb(CType(0, Byte), CType(0, Byte), CType(192, Byte))
Me.TextBoxPosition.Location = New System.Drawing.Point(104, 324)
Me.TextBoxPosition.Name = "TextBoxPosition"
Me.TextBoxPosition.Size = New System.Drawing.Size(333, 21)
Me.TextBoxPosition.TabIndex = 76
Me.TextBoxPosition.Text = ""
Me.TextBoxPosition.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'NumericUpDownSalary
'
Me.NumericUpDownSalary.DecimalPlaces = 2
Me.NumericUpDownSalary.Location = New System.Drawing.Point(152, 162)
Me.NumericUpDownSalary.Maximum = New Decimal(New Integer() {300000, 0, 0, 0})
Me.NumericUpDownSalary.Name = "NumericUpDownSalary"
Me.NumericUpDownSalary.TabIndex = 71
Me.NumericUpDownSalary.ThousandsSeparator = True
'
'lblContent
'
Me.lblContent.AutoSize = True
Me.lblContent.Location = New System.Drawing.Point(80, 218)
Me.lblContent.Name = "lblContent"
Me.lblContent.Size = New System.Drawing.Size(60, 17)
Me.lblContent.TabIndex = 74
Me.lblContent.Text = "自我介绍:"
'
'TextBoxContent
'
Me.TextBoxContent.ForeColor = System.Drawing.Color.Blue
Me.TextBoxContent.Location = New System.Drawing.Point(152, 218)
Me.TextBoxContent.Multiline = True
Me.TextBoxContent.Name = "TextBoxContent"
Me.TextBoxContent.ScrollBars = System.Windows.Forms.ScrollBars.Both
Me.TextBoxContent.Size = New System.Drawing.Size(349, 88)
Me.TextBoxContent.TabIndex = 75
Me.TextBoxContent.Text = ""
'
'DateTimePickerBirthday
'
Me.DateTimePickerBirthday.Location = New System.Drawing.Point(152, 137)
Me.DateTimePickerBirthday.Name = "DateTimePickerBirthday"
Me.DateTimePickerBirthday.TabIndex = 69
'
'CheckBoxGender
'
Me.CheckBoxGender.Location = New System.Drawing.Point(152, 87)
Me.CheckBoxGender.Name = "CheckBoxGender"
Me.CheckBoxGender.Size = New System.Drawing.Size(16, 19)
Me.CheckBoxGender.TabIndex = 65
'
'lblDepartment
'
Me.lblDepartment.AutoSize = True
Me.lblDepartment.Location = New System.Drawing.Point(104, 187)
Me.lblDepartment.Name = "lblDepartment"
Me.lblDepartment.Size = New System.Drawing.Size(35, 17)
Me.lblDepartment.TabIndex = 72
Me.lblDepartment.Text = "部门:"
'
'lblSalary
'
Me.lblSalary.AutoSize = True
Me.lblSalary.Location = New System.Drawing.Point(72, 162)
Me.lblSalary.Name = "lblSalary"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -