📄 frmmain.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmMain
Caption = "工程管理系统"
ClientHeight = 6525
ClientLeft = 60
ClientTop = 345
ClientWidth = 7710
LinkTopic = "Form1"
ScaleHeight = 6525
ScaleWidth = 7710
WindowState = 2 'Maximized
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 315
Left = 0
TabIndex = 1
Top = 6210
Width = 7710
_ExtentX = 13600
_ExtentY = 556
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 1
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList ImageList1
Left = 120
Top = 1200
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 8
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0000
Key = "delete"
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0118
Key = "help"
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":022C
Key = "new"
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0340
Key = "open"
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0454
Key = "print"
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0568
Key = "save"
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":067C
Key = "update"
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0790
Key = "sum"
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 360
Left = 0
TabIndex = 0
Top = 0
Width = 7710
_ExtentX = 13600
_ExtentY = 635
ButtonWidth = 609
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 7
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
ImageKey = "new"
BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628}
NumButtonMenus = 1
BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628}
EndProperty
EndProperty
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
ImageKey = "open"
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
ImageKey = "save"
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
ImageKey = "delete"
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
ImageKey = "update"
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
ImageKey = "print"
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
ImageKey = "help"
EndProperty
EndProperty
BorderStyle = 1
End
Begin VB.Menu menuFile
Caption = "文件[&F]"
Begin VB.Menu menuFileNew
Caption = "新建[&n]"
End
Begin VB.Menu menuFileOpen
Caption = "打开[&O]"
End
Begin VB.Menu menuFileClose
Caption = "关闭[&C]"
End
Begin VB.Menu menuFilePrint
Caption = "打印[&p]"
End
Begin VB.Menu menuFilePrintSetup
Caption = "打印设置[&s]"
End
Begin VB.Menu menuFileSend
Caption = "发送[&e]"
End
Begin VB.Menu menuFileExit
Caption = "退出[&X]"
End
End
Begin VB.Menu menuEdit
Caption = "编辑[&E]"
Begin VB.Menu menuEditAdd
Caption = "增加[&A]"
End
Begin VB.Menu menuEditDelete
Caption = "删除[&D]"
End
Begin VB.Menu menuEditUpdate
Caption = "更新[&U]"
End
Begin VB.Menu menuEditSave
Caption = "保存[&S]"
End
Begin VB.Menu menuEditInsertObject
Caption = "插入对象[&i]"
End
Begin VB.Menu menuEditObject
Caption = "编辑对象[&o]"
End
End
Begin VB.Menu menuView
Caption = "查看[&V]"
Begin VB.Menu menuViewInfo
Caption = "最新信息"
End
Begin VB.Menu menuViewOther
Caption = "其他......"
End
End
Begin VB.Menu menuTool
Caption = "工具[&T]"
Begin VB.Menu menuToolTemplate
Caption = "模板管理"
End
Begin VB.Menu menuToolEmployee
Caption = "职员管理"
End
Begin VB.Menu menuToolApply
Caption = "职位管理"
End
Begin VB.Menu menuToolPermission
Caption = "权限管理"
End
Begin VB.Menu menuToolFileType
Caption = "文件类型管理"
End
Begin VB.Menu menuToolToExcel
Caption = "传递到EXCEL"
End
Begin VB.Menu menuToolConfigure
Caption = "选项......"
End
End
Begin VB.Menu menuWindows
Caption = "窗口[&W]"
WindowList = -1 'True
End
Begin VB.Menu menuHelp
Caption = "帮助[&H]"
Begin VB.Menu menuHelpAbout
Caption = "关于......"
End
Begin VB.Menu menuHelpInfo
Caption = "有关信息"
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Unload(Cancel As Integer)
Screen.MousePointer = vbDefault
End Sub
Private Sub datPrimaryRS_Error(ByVal ErrorNumber As Long, Description As String, ByVal Scode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, fCancelDisplay As Boolean)
'This is where you would put error handling code
'If you want to ignore errors, comment out the next line
'If you want to trap them, add code here to handle them
MsgBox "Data error event hit err:" & Description
End Sub
Private Sub datPrimaryRS_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'This will display the current record position for this recordset
datPrimaryRS.Caption = "Record: " & CStr(datPrimaryRS.Recordset.AbsolutePosition)
End Sub
Private Sub datPrimaryRS_WillChangeRecord(ByVal adReason As ADODB.EventReasonEnum, ByVal cRecords As Long, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
'This is where you put validation code
'This event gets called when the following actions occur
Dim bCancel As Boolean
Select Case adReason
Case adRsnAddNew
Case adRsnClose
Case adRsnDelete
Case adRsnFirstChange
Case adRsnMove
Case adRsnRequery
Case adRsnResynch
Case adRsnUndoAddNew
Case adRsnUndoDelete
Case adRsnUndoUpdate
Case adRsnUpdate
End Select
If bCancel Then adStatus = adStatusCancel
End Sub
Private Sub cmdAdd_Click()
On Error GoTo AddErr
datPrimaryRS.Recordset.AddNew
Exit Sub
AddErr:
MsgBox Err.Description
End Sub
Private Sub cmdDelete_Click()
On Error GoTo DeleteErr
With datPrimaryRS.Recordset
.Delete
.MoveNext
If .EOF Then .MoveLast
End With
Exit Sub
DeleteErr:
MsgBox Err.Description
End Sub
Private Sub cmdRefresh_Click()
'This is only needed for multi user apps
On Error GoTo RefreshErr
datPrimaryRS.Refresh
Exit Sub
RefreshErr:
MsgBox Err.Description
End Sub
Private Sub cmdUpdate_Click()
On Error GoTo UpdateErr
datPrimaryRS.Recordset.UpdateBatch adAffectAll
Exit Sub
UpdateErr:
MsgBox Err.Description
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub menuFileNew_Click()
Dim tempfrm As frmDoc
frmDoc.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -