?? frmborrow.frm
字號:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmBorrow
Caption = "借書信息列表"
ClientHeight = 4335
ClientLeft = 60
ClientTop = 450
ClientWidth = 7380
LinkTopic = "Form1"
ScaleHeight = 4335
ScaleWidth = 7380
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdExit
Caption = "返回(&X)"
Height = 375
Left = 3000
TabIndex = 2
Top = 3480
Width = 855
End
Begin MSFlexGridLib.MSFlexGrid msglist
Height = 2295
Left = 360
TabIndex = 1
Top = 960
Width = 6615
_ExtentX = 11668
_ExtentY = 4048
_Version = 393216
End
Begin VB.Label lblTitle
Caption = "借 書 信 息 列 表"
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 0
Top = 360
Width = 3015
End
End
Attribute VB_Name = "frmBorrow"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public txtSQL As String
Dim mrc As ADODB.Recordset
Dim msgtext As String
Private Sub ShowTitle()
Dim i As Integer
Select Case brflagadd
Case 3
With msglist
.Cols = 6
For i = 0 To 5
.ColWidth(i) = 1000
.ColAlignment(i) = 0
Next i
.TextMatrix(0, 0) = "借書證號"
.TextMatrix(0, 1) = "姓名"
.TextMatrix(0, 2) = "ISBN"
.TextMatrix(0, 3) = "書名"
.TextMatrix(0, 4) = "索書號"
.TextMatrix(0, 5) = "借書日期"
.FixedRows = 1
.FillStyle = flexFillRepeat
.Col = 0
.Row = 0
.RowSel = 1
.ColSel = .Cols - 1
.CellAlignment = 4
.Row = 1
End With
Case 4
With msglist
.Cols = 7
For i = 0 To 6
.ColWidth(i) = 1000
.ColAlignment(i) = 0
Next i
.TextMatrix(0, 0) = "借書證號"
.TextMatrix(0, 1) = "姓名"
.TextMatrix(0, 2) = "ISBN"
.TextMatrix(0, 3) = "書名"
.TextMatrix(0, 4) = "索書號"
.TextMatrix(0, 5) = "借書日期"
.TextMatrix(0, 6) = "還書日期"
.FixedRows = 1
.FillStyle = flexFillRepeat
.Col = 0
.Row = 0
.RowSel = 1
.ColSel = .Cols - 1
.CellAlignment = 4
.Row = 1
End With
End Select
End Sub
Private Sub ShowData()
Dim j As Integer
Dim i As Integer
Set mrc = ExecuteSQL(txtSQL, msgtext)
With msglist
.Rows = 1
Do While Not mrc.EOF
.Rows = .Rows + 1
For i = 1 To mrc.Fields.Count
Select Case mrc.Fields(i - 1).Type
Case adDBDate
.TextMatrix(.Rows - 1, i - 1) = Format(mrc.Fields(i - 1) & "", "yyyy-mm-dd")
Case Else
.TextMatrix(.Rows - 1, i - 1) = mrc.Fields(i - 1) & ""
End Select
Next i
mrc.MoveNext
Loop
End With
mrc.Close
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub Form_Load()
ShowTitle
ShowData
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -