📄 bklook_view3.frm
字号:
BorderWidth = 2
Height = 15
Left = 120
Top = 1200
Width = 2175
End
Begin VB.Shape Shape2
BorderColor = &H0000FF00&
BorderWidth = 2
Height = 15
Left = 120
Top = 1245
Width = 2055
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "历史库查询"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 375
Index = 0
Left = 120
TabIndex = 5
Top = 720
Width = 2655
End
End
Begin VB.CommandButton Command6
Caption = "退 出(&E)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7320
TabIndex = 0
Top = 5400
Width = 1455
End
Begin MSComctlLib.ListView ListView1
Height = 5295
Left = 2640
TabIndex = 1
Top = 0
Width = 3615
_ExtentX = 6376
_ExtentY = 9340
View = 3
Arrange = 1
LabelEdit = 1
LabelWrap = -1 'True
HideSelection = 0 'False
AllowReorder = -1 'True
FullRowSelect = -1 'True
GridLines = -1 'True
PictureAlignment= 5
_Version = 393217
Icons = "ImageList1"
SmallIcons = "ImageList1"
ColHdrIcons = "ImageList1"
ForeColor = -2147483640
BackColor = -2147483634
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 3
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "学号"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 1
Text = "姓名"
Object.Width = 2540
EndProperty
BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628}
SubItemIndex = 2
Text = "班级"
Object.Width = 2540
EndProperty
Picture = "bklook_view3.frx":3B2D6
End
Begin MSComctlLib.ImageList ImageList1
Left = 3600
Top = 5280
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 2
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "bklook_view3.frx":4F1EA
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "bklook_view3.frx":4F346
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "bklook_view3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public jj As Integer
Public nn As String
Private Sub Command6_Click()
Unload Me
End Sub
Private Sub Form_Resize()
On Error GoTo 1
Picture1.Height = Me.Height - Command6.Height - 500
Frame1.Width = Me.Width - Picture1.Width - ListView1.Width - 350
ListView1.Height = Picture1.Height
Frame1.Left = Me.Width - Frame1.Width - 200
Frame1.Height = Picture1.Height
Command6.Left = Me.Width - Command6.Width - 200
Command6.Top = Picture1.Height + 100
MSHFlexGrid1.Width = Frame1.Width - 200
MSHFlexGrid1.Height = Frame1.Height - MSHFlexGrid1.Top - 200
1
End Sub
Private Sub Form_Load()
Call ListView1.ListItems.Add(, "S1", "skdks", 1, 1)
ListView1.ListItems.Clear
ListView1.Refresh
Dim temp As New ADODB.Recordset
temp.Open "select [student].[na],[student].[sex],[student].[stid],[student].[po],[class].[na]+'班',[student].[ID] from [student],[class] where [student].[clasid]=[class].[ID] and [class].[yid]=" & jj & " order by [student].[stid]", main.connect, 3, 2
For i = 1 To temp.RecordCount
Next
Dim itmX As ListItem
For i = 1 To temp.RecordCount
Set itmX = ListView1.ListItems.Add(, "S" & temp.Fields(5), temp.Fields(2), 1, 1)
itmX.SubItems(1) = temp.Fields(0)
itmX.SubItems(2) = temp.Fields(4)
temp.MoveNext
Next
temp.Close
MSHFlexGrid1.Row = 0
MSHFlexGrid1.Col = 0
MSHFlexGrid1.Text = "学分登记纪录"
MSHFlexGrid1.Col = 1
MSHFlexGrid1.Text = "学 年"
MSHFlexGrid1.Col = 2
MSHFlexGrid1.Text = "登记日期"
MSHFlexGrid1.Col = 3
MSHFlexGrid1.Text = "学 分"
MSHFlexGrid1.Col = 4
MSHFlexGrid1.Text = "学 绩"
MSHFlexGrid1.Col = 5
MSHFlexGrid1.Text = "学分绩"
Label2.Caption = nn
ListView1.Refresh
End Sub
Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
'On Error GoTo 1
Label3.Caption = Item.Text
Label6.Caption = Item.SubItems(1)
Label8.Caption = Item.SubItems(2)
MSHFlexGrid1.Rows = 2
MSHFlexGrid1.Row = 1
MSHFlexGrid1.Col = 0
MSHFlexGrid1.Text = ""
MSHFlexGrid1.Col = 1
MSHFlexGrid1.Text = ""
MSHFlexGrid1.Col = 2
MSHFlexGrid1.Text = ""
MSHFlexGrid1.Col = 3
MSHFlexGrid1.Text = ""
MSHFlexGrid1.Col = 4
MSHFlexGrid1.Text = ""
MSHFlexGrid1.Col = 5
MSHFlexGrid1.Text = ""
id = Right(ListView1.SelectedItem.Key, Len(ListView1.SelectedItem.Key) - 1)
Dim temp As New ADODB.Recordset
Dim temp2 As New ADODB.Recordset
Dim itmX As ListItem
temp.Open " select * from [jc] where [stid]=" & id & " order by [xn]", main.connect, 3, 2
If temp.RecordCount <> 0 Then MSHFlexGrid1.Rows = temp.RecordCount + 1
For i = 1 To temp.RecordCount
b = ""
temp2.Open "select * from [gz] ", main.connect, 3, 2
temp2.Find "ID = " & temp.Fields(2), 0, adSearchForward, 1
While (Not (temp2.EOF))
b = "[" & temp2.Fields(1) & "]" & b
idf = temp2.Fields(5)
temp2.Find "ID = " & idf, 0, adSearchForward, 1
Wend
temp2.Close
MSHFlexGrid1.Row = i
MSHFlexGrid1.Col = 0
MSHFlexGrid1.Text = b
MSHFlexGrid1.Col = 1
MSHFlexGrid1.Text = temp.Fields(4) & "-" & temp.Fields(4) + 1
MSHFlexGrid1.Col = 2
MSHFlexGrid1.Text = temp.Fields(3)
MSHFlexGrid1.Col = 3
MSHFlexGrid1.Text = temp.Fields(5)
temp2.Open "select * from [gz] where [ID]=" & temp.Fields(2), main.connect, 3, 2
If temp2.RecordCount <> 0 Then
MSHFlexGrid1.Col = 4
MSHFlexGrid1.Text = temp2.Fields(4)
MSHFlexGrid1.Col = 5
MSHFlexGrid1.Text = temp2.Fields(4) * temp.Fields(5)
End If
temp2.Close
temp.MoveNext
Next
temp.Close
1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -