📄 frm_report.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{7FE1EF9D-8A4E-4FCC-92F0-323325028F8A}#3.6#0"; "etCell.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Frm_report
Caption = "报表"
ClientHeight = 7635
ClientLeft = 165
ClientTop = 450
ClientWidth = 11025
Icon = "Frm_report.frx":0000
LinkTopic = "Form1"
ScaleHeight = 7635
ScaleWidth = 11025
StartUpPosition = 3 '窗口缺省
WindowState = 2 'Maximized
Begin MSComDlg.CommonDialog CommonDialog1
Left = 5730
Top = 120
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSComctlLib.ImageList ImageList1
Left = 6270
Top = 60
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 5
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_report.frx":08CA
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_report.frx":11A4
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_report.frx":14BE
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_report.frx":17D8
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "Frm_report.frx":24B2
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 600
Left = 0
TabIndex = 1
Top = 0
Width = 11025
_ExtentX = 19447
_ExtentY = 1058
ButtonWidth = 1032
ButtonHeight = 1005
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 8
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "打印浏览"
ImageIndex = 1
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "导出Excel文件"
ImageIndex = 4
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "导出Html文件"
ImageIndex = 5
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Object.ToolTipText = "退出"
ImageIndex = 3
EndProperty
EndProperty
End
Begin ETCELLLib.EtCell EtCell1
Height = 6975
Left = 60
TabIndex = 0
Top = 630
Width = 14745
_Version = 196614
_ExtentX = 26009
_ExtentY = 12303
_StockProps = 0
ReadOnly = -1 'True
End
End
Attribute VB_Name = "Frm_report"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public StrTableName As String
Public StrSql As String
Public IntRow As Integer
Public IntCol As Integer
Public IntSum1 As Double
Public IntSum2 As Double
Private Sub Form_Load()
EtCell1.Height = Me.ScaleHeight
EtCell1.Width = Me.ScaleWidth
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
On Error GoTo err:
Select Case Button.Index
Case 3
EtCell1.Ruler = False
''纵横向打印
EtCell1.PrintDirectH = False
'''自动调整
EtCell1.PrintFullPage = True
''是否打印页码
EtCell1.PrintPageNo = True
''自动调整行高.列宽
EtCell1.SetAutoAdjustTable 0
EtCell1.PrintPreview
Case 5
CommonDialog1.Filter = "Excel文件|*.xls"
CommonDialog1.ShowSave
If CommonDialog1.FileName = "" Then Exit Sub
EtCell1.SaveAs CommonDialog1.FileName
MsgBox "导入成功!!", vbInformation, "济宁远望"
Case 6
CommonDialog1.Filter = "Html文件|*.htm"
CommonDialog1.ShowSave
If CommonDialog1.FileName = "" Then Exit Sub
EtCell1.SaveAs CommonDialog1.FileName
MsgBox "导入成功!!", vbInformation, "济宁远望"
Case 8
Unload Me
End Select
Exit Sub
err:
MsgBox err.Description, vbInformation, "提示"
End Sub
'
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -