📄 xxprint.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form xxprint
BorderStyle = 3 'Fixed Dialog
Caption = "明细学分报表打印[选择班级]"
ClientHeight = 5940
ClientLeft = 45
ClientTop = 330
ClientWidth = 8310
Icon = "xxprint.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5940
ScaleWidth = 8310
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.PictureBox Picture1
BackColor = &H00FFE09E&
Height = 5415
Left = 0
Picture = "xxprint.frx":030A
ScaleHeight = 5355
ScaleWidth = 2475
TabIndex = 7
TabStop = 0 'False
Top = 0
Width = 2535
Begin VB.Shape Shape2
BorderColor = &H0000FF00&
BorderWidth = 2
Height = 15
Left = 120
Top = 1000
Width = 2055
End
Begin VB.Shape Shape1
BorderColor = &H000000FF&
BorderWidth = 2
Height = 15
Left = 120
Top = 960
Width = 2175
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 = &H00800000&
Height = 375
Index = 1
Left = 1005
TabIndex = 10
Top = 525
Width = 1335
End
Begin VB.Image Image1
Height = 720
Left = 240
Picture = "xxprint.frx":3A36E
Stretch = -1 'True
Top = 120
Width = 720
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = " 请您选择您要进行学生文化课成绩管理的班级及学年。"
BeginProperty Font
Name = "宋体"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 1335
Left = 120
TabIndex = 9
Top = 1200
Width = 1695
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 = 980
TabIndex = 8
Top = 500
Width = 1335
End
End
Begin VB.CommandButton Command2
Caption = "选 择(&Y)"
Default = -1 'True
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 4440
TabIndex = 6
Top = 5520
Width = 1815
End
Begin VB.CommandButton Command4
Cancel = -1 'True
Caption = "取 消(&C)"
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 6480
TabIndex = 5
Top = 5520
Width = 1815
End
Begin VB.Frame Frame1
Height = 855
Left = 2640
TabIndex = 1
Top = 4560
Width = 5655
Begin VB.TextBox Text1
Alignment = 1 'Right Justify
BeginProperty Font
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3480
TabIndex = 2
Text = "2001"
Top = 360
Width = 615
End
Begin MSComCtl2.UpDown UpDown1
Height = 375
Left = 4095
TabIndex = 3
Top = 360
Width = 240
_ExtentX = 423
_ExtentY = 661
_Version = 393216
Value = 2001
AutoBuddy = -1 'True
BuddyControl = "Text1"
BuddyDispid = 196618
OrigLeft = 4440
OrigTop = 720
OrigRight = 4680
OrigBottom = 1095
Max = 3000
Min = 2001
SyncBuddy = -1 'True
BuddyProperty = 65547
Enabled = -1 'True
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "选择学年(&E):"
BeginProperty Font
Name = "宋体"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 4320
TabIndex = 11
Top = 360
Width = 1575
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "选择学年(&E):"
BeginProperty Font
Name = "宋体"
Size = 11.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 375
Left = 1800
TabIndex = 4
Top = 360
Width = 1575
End
End
Begin MSComctlLib.TreeView TreeView1
Height = 4575
Left = 2640
TabIndex = 0
Top = 0
Width = 5655
_ExtentX = 9975
_ExtentY = 8070
_Version = 393217
HideSelection = 0 'False
LabelEdit = 1
Style = 7
ImageList = "ImageList1"
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSComctlLib.ImageList ImageList1
Left = 3000
Top = 5280
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 5
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "xxprint.frx":3A678
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "xxprint.frx":3B4CC
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "xxprint.frx":3DC80
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "xxprint.frx":3EAD4
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "xxprint.frx":3F3B0
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "xxprint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public yesno As Boolean
Public nn As String
Public kk As Integer
Public yy As Integer
Private Sub Command2_Click()
yesno = True
yy = Text1.Text
kk = Right(TreeView1.SelectedItem.Key, Len(TreeView1.SelectedItem.Key) - 1)
nn = TreeView1.SelectedItem.Parent.Parent.Parent.Text & TreeView1.SelectedItem.Parent.Parent.Text & TreeView1.SelectedItem.Parent.Text & TreeView1.SelectedItem.Text
Dim temp As New bp1print_msg
temp.yy = yy
temp.jj = kk
temp.Show 1
Unload Me
Dim ff As New xxprint_pp
ff.nn = nn
ff.yy = yy
ff.studentcount = temp.studentcount
ff.classcount = temp.classcount
If temp.studentcount = 0 Then
MsgBox "没有学生注册在此年级", vbOKOnly Or vbInformation, "提示"
Exit Sub
End If
ff.Show 1
End Sub
Private Sub Command4_Click()
Unload Me
End Sub
Private Sub Form_Load()
'初始窗体
yesno = False
Dim nodX As Node
Set nodX = TreeView1.Nodes.Add(, , "R", "西安科技学院", 1)
Dim xu As New ADODB.Recordset
Dim zy As New ADODB.Recordset
Dim nj As New ADODB.Recordset
Dim ban As New ADODB.Recordset
xu.Open "select * from [xb]", main.connect, 3, 2
For i = 1 To xu.RecordCount
Set nodX = TreeView1.Nodes.Add("R", tvwChild, "X" & xu.Fields(0), xu.Fields(1) & "系", 2)
zy.Open "select * from [zy] where [xid]=" & xu.Fields(0), main.connect, 3, 2
For i1 = 1 To zy.RecordCount
Set nodX = TreeView1.Nodes.Add("X" & xu.Fields(0), tvwChild, "Z" & zy.Fields(0), zy.Fields(1) & "专业", 3)
nj.Open "select * from [yc] where [zyid]=" & zy.Fields(0), main.connect, 3, 2
For i2 = 1 To nj.RecordCount
Set nodX = TreeView1.Nodes.Add("Z" & zy.Fields(0), tvwChild, "N" & nj.Fields(0), nj.Fields(1) & "级", 4)
nj.MoveNext
Next
nj.Close
zy.MoveNext
Next
zy.Close
xu.MoveNext
Next
yy = Year(Now)
If Month(Now) < 8 Then yy = yy - 1
Text1.Text = yy
Label3.Caption = "-" & Text1.Text
yesno = False
SendKeys "{RIGHT}"
End Sub
Private Sub Text1_Change()
Label3.Caption = "--" & Text1.Text + 1 & "学年"
End Sub
Private Sub TreeView1_DblClick()
If Command2.Enabled = True Then Command2_Click
End Sub
Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
a = Left(Node.Key, 1)
If a = "N" Then Command2.Enabled = True Else Command2.Enabled = False
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 38 And Text1.Text < 2999 Then Text1.Text = Text1.Text + 1
If KeyCode = 40 And Text1.Text > 2001 Then Text1.Text = Text1.Text - 1
KeyCode = 0
Shift = 0
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
KeyAscii = 0
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -