📄 report_frm.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Object = "{FD7EECEF-93A4-46C6-82C3-7AFDA12DE89E}#1.0#0"; "VsNetMenu.ocx"
Begin VB.Form Report_frm
Caption = "报表显示"
ClientHeight = 3195
ClientLeft = 2775
ClientTop = 4050
ClientWidth = 6030
Icon = "Report_frm.frx":0000
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 6030
StartUpPosition = 1 '所有者中心
Begin MSAdodcLib.Adodc Adodc
Height = 330
Left = 3360
Top = 1560
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VBVsNetMenu.VsNetMenu VsNetMenu1
Left = 2760
Top = 1800
_ExtentX = 926
_ExtentY = 926
MenuBarEnd = 16744576
MainMenuBackStar= 16744576
MenuBorder2003 = 16711680
BmpCount = 1
Bmp:1 = "Report_frm.frx":038A
Mask:1 = 16777215
Key:1 = "#FileSave_menu"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSComDlg.CommonDialog SDialog
Left = 8880
Top = 830
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSDataGridLib.DataGrid DataGrid
Bindings = "Report_frm.frx":049C
Height = 5805
Left = 0
TabIndex = 0
Top = 0
Visible = 0 'False
Width = 7755
_ExtentX = 13679
_ExtentY = 10239
_Version = 393216
AllowUpdate = 0 'False
AllowArrows = 0 'False
BackColor = 16777215
DefColWidth = 53
Enabled = 0 'False
ColumnHeaders = -1 'True
ForeColor = 16711680
HeadLines = 1
RowHeight = 23
RowDividerStyle = 4
BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ColumnCount = 2
BeginProperty Column00
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column01
DataField = ""
Caption = ""
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
RecordSelectors = 0 'False
BeginProperty Column00
EndProperty
BeginProperty Column01
EndProperty
EndProperty
End
Begin VB.Menu File_menu
Caption = "文件(&F)"
Begin VB.Menu FileSave_menu
Caption = "保存为数据库(&S)"
End
Begin VB.Menu FileExcel_menu
Caption = "保存为Excel表格"
End
Begin VB.Menu FileExit_menu
Caption = "回主界面(&X)"
End
End
End
Attribute VB_Name = "Report_frm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim SFile As New Scripting.FileSystemObject
Dim DBFile As Scripting.File
Private Sub FileExcel_menu_Click()
SDialog.Filter = "Excel文件(*.xls)|*.xls"
SDialog.ShowSave
If SDialog.FileName <> "" Then
CreateExcel (SDialog.FileName)
MsgBox "保存成功"
End If
End Sub
Private Sub FileExit_menu_Click()
Unload Me
End Sub
Private Sub FileSave_menu_Click()
On Error GoTo handle
Set SFile = CreateObject("Scripting.FileSystemObject")
Set DBFile = SFile.GetFile(App.Path & "\Report.tmp")
SDialog.Filter = "数据库文件(*.mdb)|*.mdb"
SDialog.ShowSave
If SDialog.FileName <> "" Then
DBFile.Copy SDialog.FileName, True
MsgBox "保存成功"
End If
Exit Sub
handle:
MsgBox "文件保存错误!"
End Sub
Private Sub Form_Load()
Adodc.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\report.tmp;Mode=Read;Persist Security Info=False"
Adodc.RecordSource = "select * from 成绩统计结果"
Adodc.Refresh
DataGrid.Visible = True
End Sub
Private Sub Form_Resize()
If Me.WindowState <> vbMinimized Then
DataGrid.Width = Me.Width - 120
DataGrid.Height = Me.Height - 820
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -