module1.bas

来自「print打印功能.实现套打,请下载查看具体的功能介绍.」· BAS 代码 · 共 45 行

BAS
45
字号
Attribute VB_Name = "Module1"
Option Explicit
Public g_strAppPath As String

Sub Main()
    g_strAppPath = IIf(Right(App.Path, "1") = "\", App.Path, App.Path & "\")
    mFrm_Main.Show
End Sub

Public Sub ErrInfo(Optional tmpstr As String = "")
    If tmpstr <> "" Then
        Call MsgBox(tmpstr, vbExclamation, App.EXEName)
    Else
        Call MsgBox(Err.Number & ":" & Err.Description & " ", vbExclamation, App.EXEName)
    End If
End Sub

Public Function ListFind(List As Object, mText As String, Optional FindList As Boolean = False) As Integer
    
    With List
    
        If Not FindList Then
            
            If Val(mText) = 0 And mText <> "0" Then
                For ListFind = 0 To .ListCount - 1
                    If .List(ListFind) = mText Then Exit For
                Next
            Else
                For ListFind = 0 To .ListCount - 1
                    If .ItemData(ListFind) = Val(mText) Then Exit For
                Next
            End If
        
        Else
            For ListFind = 0 To .ListCount - 1
                If .ItemData(ListFind) = Val(mText) Then Exit For
            Next
        End If
        
        If ListFind = .ListCount Then ListFind = -1
    End With
    
End Function

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?