📄 frmcl.vb
字号:
Public Class Frmcl
Inherits System.Windows.Forms.Form
#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 Label1 As System.Windows.Forms.Label
Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid
Friend WithEvents Button1 As System.Windows.Forms.Button
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Label1 = New System.Windows.Forms.Label
Me.DataGrid1 = New System.Windows.Forms.DataGrid
Me.Button1 = New System.Windows.Forms.Button
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Label1
'
Me.Label1.Font = New System.Drawing.Font("楷体_GB2312", 15.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(134, Byte))
Me.Label1.ForeColor = System.Drawing.Color.Navy
Me.Label1.Location = New System.Drawing.Point(120, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(160, 24)
Me.Label1.TabIndex = 0
Me.Label1.Text = "教材存量一览表"
'
'DataGrid1
'
Me.DataGrid1.AlternatingBackColor = System.Drawing.Color.Lavender
Me.DataGrid1.BackColor = System.Drawing.Color.WhiteSmoke
Me.DataGrid1.BackgroundColor = System.Drawing.Color.LightGray
Me.DataGrid1.CaptionBackColor = System.Drawing.Color.LightSteelBlue
Me.DataGrid1.CaptionForeColor = System.Drawing.Color.MidnightBlue
Me.DataGrid1.CaptionText = " 教材存量"
Me.DataGrid1.DataMember = ""
Me.DataGrid1.FlatMode = True
Me.DataGrid1.Font = New System.Drawing.Font("Tahoma", 8.0!)
Me.DataGrid1.ForeColor = System.Drawing.Color.MidnightBlue
Me.DataGrid1.GridLineColor = System.Drawing.Color.Gainsboro
Me.DataGrid1.HeaderBackColor = System.Drawing.Color.MidnightBlue
Me.DataGrid1.HeaderFont = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.DataGrid1.HeaderForeColor = System.Drawing.Color.WhiteSmoke
Me.DataGrid1.LinkColor = System.Drawing.Color.Teal
Me.DataGrid1.Location = New System.Drawing.Point(48, 56)
Me.DataGrid1.Name = "DataGrid1"
Me.DataGrid1.ParentRowsBackColor = System.Drawing.Color.Gainsboro
Me.DataGrid1.ParentRowsForeColor = System.Drawing.Color.MidnightBlue
Me.DataGrid1.SelectionBackColor = System.Drawing.Color.CadetBlue
Me.DataGrid1.SelectionForeColor = System.Drawing.Color.WhiteSmoke
Me.DataGrid1.Size = New System.Drawing.Size(336, 152)
Me.DataGrid1.TabIndex = 1
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(160, 232)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(96, 32)
Me.Button1.TabIndex = 2
Me.Button1.Text = "退 出"
'
'Frmcl
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(424, 301)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.DataGrid1)
Me.Controls.Add(Me.Label1)
Me.Name = "Frmcl"
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "frmcl"
CType(Me.DataGrid1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Finalize()
End Sub
Private Sub Frmcl_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim sqlstr As String
sqlstr = "SELECT * FROm jccl "
Dim ds As New DataSet
ds.Clear()
Me.DataGrid1.ReadOnly = True
ds = GetDataFromDB(sqlstr)
Me.DataGrid1.DataSource = ds.Tables(0).DefaultView
End Sub
End Class
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -