frmkm.frm
来自「能分班系统采用Z线分班方法:即由系统自动抽签(也可由班主任抽签)」· FRM 代码 · 共 648 行 · 第 1/2 页
FRM
648 行
VERSION 5.00
Object = "{90F3D7B3-92E7-44BA-B444-6A8E2A3BC375}#1.0#0"; "ACTSKIN4.OCX"
Object = "{D76D7130-4A96-11D3-BD95-D296DC2DD072}#1.0#0"; "Vsflex7d.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form FRMkm
BorderStyle = 3 'Fixed Dialog
Caption = "智能分班数据"
ClientHeight = 5460
ClientLeft = 45
ClientTop = 330
ClientWidth = 6870
Icon = "FRMkm.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5460
ScaleWidth = 6870
StartUpPosition = 2 'CenterScreen
Begin ComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 885
Left = 0
TabIndex = 0
Top = 0
Width = 6870
_ExtentX = 12118
_ExtentY = 1561
ButtonHeight = 1411
Appearance = 1
_Version = 327682
BorderStyle = 1
Begin VB.CommandButton Command4
Caption = "清空数据"
Height = 465
Left = 1530
TabIndex = 6
Top = 210
Width = 1005
End
Begin VB.CommandButton Command5
Caption = "删除此行"
Height = 465
Left = 2730
TabIndex = 5
Top = 210
Width = 1005
End
Begin VB.CommandButton Command6
Caption = "退出程序"
Height = 465
Left = 5070
TabIndex = 4
Top = 210
Width = 1005
End
Begin VB.CommandButton Command7
Caption = "保存数据"
Height = 465
Left = 3900
TabIndex = 3
Top = 210
Width = 1005
End
Begin VB.ComboBox Combo3
ForeColor = &H00FF0000&
Height = 300
ItemData = "FRMkm.frx":2D42
Left = 300
List = "FRMkm.frx":2D44
TabIndex = 2
Text = "Combo3"
Top = 420
Width = 945
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel3
Height = 255
Index = 2
Left = 270
OleObjectBlob = "FRMkm.frx":2D46
TabIndex = 1
Top = 90
Width = 1065
End
End
Begin VB.CommandButton Command3
Caption = "性别自动转换"
Height = 525
Left = 420
TabIndex = 12
Top = 2970
Width = 1245
End
Begin VB.Frame Frame1
Caption = "数据导入"
Height = 4455
Left = 90
TabIndex = 9
Top = 960
Width = 1935
Begin VB.CommandButton Command2
Caption = "EXCEL 导入"
Height = 525
Left = 330
TabIndex = 11
Top = 1080
Width = 1245
End
Begin VB.CommandButton Command1
Caption = "库内数据导入"
Height = 525
Left = 330
TabIndex = 10
Top = 360
Width = 1245
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel3
Height = 1665
Index = 4
Left = 120
OleObjectBlob = "FRMkm.frx":2DA5
TabIndex = 13
Top = 2670
Width = 1725
End
End
Begin MSComDlg.CommonDialog Cmd1
Left = 1560
Top = 2610
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.CommandButton Command9
Caption = "Command1"
Height = 465
Left = 1170
TabIndex = 8
Top = 7020
Width = 675
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access 2000;"
DatabaseName = ""
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 405
Left = 990
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 7560
Visible = 0 'False
Width = 1140
End
Begin ACTIVESKINLibCtl.Skin Skin1
Left = 450
OleObjectBlob = "FRMkm.frx":2EA2
Top = 6990
End
Begin VSFlex7DAOCtl.VSFlexGrid VSFlexGrid1
Align = 4 'Align Right
Bindings = "FRMkm.frx":19ED5
Height = 4575
Left = 2130
TabIndex = 7
Top = 885
Width = 4740
_cx = 8361
_cy = 8070
_ConvInfo = 1
Appearance = 0
BorderStyle = 0
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
MousePointer = 0
BackColor = -2147483643
ForeColor = 16711680
BackColorFixed = 14803425
ForeColorFixed = 255
BackColorSel = 14540253
ForeColorSel = 255
BackColorBkg = 14803425
BackColorAlternate= -2147483643
GridColor = 14803425
GridColorFixed = 14803425
TreeColor = -2147483632
FloodColor = 192
SheetBorder = -2147483642
FocusRect = 1
HighLight = 1
AllowSelection = -1 'True
AllowBigSelection= -1 'True
AllowUserResizing= 1
SelectionMode = 1
GridLines = 1
GridLinesFixed = 2
GridLineWidth = 1
Rows = 50
Cols = 10
FixedRows = 1
FixedCols = 1
RowHeightMin = 0
RowHeightMax = 0
ColWidthMin = 0
ColWidthMax = 0
ExtendLastCol = 0 'False
FormatString = ""
ScrollTrack = -1 'True
ScrollBars = 3
ScrollTips = -1 'True
MergeCells = 0
MergeCompare = 0
AutoResize = 0 'False
AutoSizeMode = 0
AutoSearch = 0
AutoSearchDelay = 2
MultiTotals = -1 'True
SubtotalPosition= 1
OutlineBar = 0
OutlineCol = 0
Ellipsis = 0
ExplorerBar = 0
PicturesOver = 0 'False
FillStyle = 1
RightToLeft = 0 'False
PictureType = 0
TabBehavior = 0
OwnerDraw = 0
Editable = 2
ShowComboButton = 2
WordWrap = 0 'False
TextStyle = 0
TextStyleFixed = 0
OleDragMode = 0
OleDropMode = 0
DataMode = 1
VirtualData = -1 'True
ComboSearch = 3
AutoSizeMouse = -1 'True
FrozenRows = 0
FrozenCols = 0
AllowUserFreezing= 3
BackColorFrozen = 255
ForeColorFrozen = 14540253
WallPaperAlignment= 9
End
End
Attribute VB_Name = "FRMkm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Database
Dim rs As Recordset
Dim STR As String
Dim XS As String '取出COM中的输入显示中的代码信息
Dim NUM As Long
Dim KG As Boolean
Dim SHFileOp As SHFILEOPSTRUCT
Private Sub ExportExcelSheetToAccess(sSheetName As String, sExcelPath As String, sAccessTable As String, sAccessDBPath As String)
On Error GoTo 3125
Dim db As Database
Dim rs As Recordset
Set db = OpenDatabase(sExcelPath, True, False, "Excel 8.0")
Call db.Execute("Select * into [;database=" & sAccessDBPath & "]." & sAccessTable & " FROM [" & sSheetName & "$]")
3125:
Select Case Err.Number
Case 3125
MsgBox "您输入的工作表名称有误", 32, "无法操作"
Exit Sub
Case 3010
MsgBox "数据已存在", 32, "无法操作"
Exit Sub
End Select
End Sub
Private Sub Command1_Click()
On Error Resume Next
Cmd1.FileName = ""
Cmd1.InitDir = App.Path
Cmd1.Flags = cdlOFNHideReadOnly
Cmd1.Filter = "NHB库内文件(*.NHB)|*.NHB|"
Cmd1.ShowOpen
'Me.Caption = Cmd1.FileName
If Cmd1.FileName = "" Then
Me.Enabled = True
Exit Sub
Else
Data1.DatabaseName = Cmd1.FileName
Data1.RecordSource = "SELECT 学号,姓名,性别,分数 FROM NHB"
Data1.Refresh
End If
Set db = OpenDatabase(App.Path & "\TEMP\" & HHVI & ".NHB")
Set rs = db.OpenRecordset("NHB")
NUM = 0
rs.MoveFirst
Do While Not rs.EOF()
NUM = NUM + 1
rs.MoveNext '得到数据库中的总数目
Loop
'############################################################################
Dim III As Long
For III = 1 To VSFlexGrid1.Rows - 1
VSFlexGrid1.TextMatrix(III, 0) = III
Next '在表格左列显示数据总数目
'############################################################################
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?