📄 bjll.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "msflxgrd.ocx"
Begin VB.Form 班级浏览
Caption = "班级管理-班级浏览"
ClientHeight = 4710
ClientLeft = 60
ClientTop = 345
ClientWidth = 7845
LinkTopic = "Form6"
ScaleHeight = 4710
ScaleWidth = 7845
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame1
Height = 4605
Left = 30
TabIndex = 0
Top = 60
Width = 7785
Begin VB.CommandButton Command1
Caption = "返回"
Height = 255
Left = 7170
TabIndex = 3
Top = 330
Width = 525
End
Begin MSFlexGridLib.MSFlexGrid MSF1
Height = 3945
Left = 0
TabIndex = 2
Top = 600
Width = 7725
_ExtentX = 13626
_ExtentY = 6959
_Version = 393216
End
Begin VB.Label Label1
Alignment = 1 'Right Justify
Caption = "班 级 浏 览"
BeginProperty Font
Name = "黑体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 60
TabIndex = 1
Top = 180
Width = 4875
End
End
End
Attribute VB_Name = "班级浏览"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Sub classshowtitle()
Dim i As Integer
MSF1.Clear
With MSF1
.Cols = 5
.TextMatrix(0, 1) = "班级代码"
.TextMatrix(0, 2) = "班级名称"
.TextMatrix(0, 3) = "所属专业"
.TextMatrix(0, 4) = "所属院系"
.ColWidth(0) = 200
.ColWidth(1) = 800
.ColWidth(2) = 1400
.ColWidth(3) = 1800
.ColWidth(4) = 1800
.FixedRows = 1
.FillStyle = flexFillSingle
.Col = 0
.Row = 0
.RowSel = 1
.ColSel = .Cols - 1
.CellAlignment = 4
.Row = 1
End With
End Sub
'显示MSFlexGrid的内容
Public Sub classshowdata()
Dim j As Integer
Dim i As Integer
Dim mrc1 As ADODB.Recordset
Set mrc1 = ExecuteSQL(Trim(txtsql))
If mrc1.EOF = False Then
mrc1.MoveFirst
With MSF1
.Rows = 1
Do While Not mrc1.EOF
.Rows = .Rows + 1
For i = 1 To mrc1.Fields.Count
.TextMatrix(.Rows - 1, i) = mrc1.Fields(i - 1)
Next i
mrc1.MoveNext
Loop
mrc1.Close
End With
End If
End Sub
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
'Dim mrc As ADODB.Recordset
txtsql = "select a.班级代码,a. 班级名称,b.专业名称,c.院系名称 from 班级 a,专业 b,院系 c where a.专业代码=b.专业代码 and a.院系代码=c.院系代码 order by 班级代码"
'Set mrc = ExecuteSQL(txtsql)
Me.classshowtitle
Me.classshowdata
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -