📄 mmain.bas
字号:
Attribute VB_Name = "MMain"
Option Explicit
'以下常量用于建立流程元素时。
Public Const AddBegin As Integer = -3
Public Const AddNode As Integer = -2
Public Const AddEnd As Integer = -4
Public Const AddRoute As Integer = -1
Public Const AddClear As Integer = 0
'程序入口
'
'
Public Sub Main()
On Error GoTo ErrHandler
' frmFlash.Show
Dim l As Long
l = 1
Do
If MNotes.Init Then
Exit Do
End If
If l = 1 Then
End
End If
l = l + 1
Loop
Dim strPath As String
If MNotes.Login Then
If Right$(App.path, 1) <> "\" Then
App.HelpFile = App.path & "\" & "WORKFLOWHELP.CHM"
Else
App.HelpFile = App.path & "WORKFLOWHELP.CHM"
End If
frmMain.Display
Exit Sub
End If
ErrHandler:
TermMain
'Unload frmFlash
End Sub
'该函数将把字符串数组中的空串过滤掉,返回新的字符串数组。
'时间:2002-12-13
'
Public Function TrueStrings(Values) As String()
Dim strs() As String
Dim i As Long, cnt As Long
cnt = 0
ReDim strs(0)
If IsEmpty(Values) Then
TrueStrings = strs
Exit Function
End If
For i = LBound(Values) To UBound(Values)
If Values(i) <> "" Then
ReDim Preserve strs(0 To cnt)
strs(cnt) = Values(i)
cnt = cnt + 1
End If
Next i
TrueStrings = strs
End Function
'将时间串(DateTime)分割成数值(dig)和单位(DanWei)两部分。
Public Sub SeprateDateTime(DateTime As String, dig As String, DanWei As String)
Dim i As Integer, j As Integer
Dim c As String
Dim l As Long
l = Len(DateTime)
c = Right(DateTime, 2)
Select Case c
Case "月]"
i = 1
Case "期]"
i = 2
Case "日]"
If mId(DateTime, l - 2, 1) = "作" Then
i = 3
Else
i = 1
End If
Case "时]"
If mId(DateTime, l - 3, 1) = "作" Then
i = 4
Else
i = 2
End If
Case Else
Exit Sub
End Select
dig = Left$(DateTime, l - i - 2)
DanWei = VBA.mId$(DateTime, l - i, i)
End Sub
Sub TermMain()
Unload frmImage
Unload frmMainProperties
Unload frmNodeProperties
Unload frmProp
Unload frmSetAgent
Unload frmSetPeople
Unload frmSetPeople2
Unload frmMain
MNotes.Term
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -