⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modmain.bas

📁 这是一个用来打印手机三包凭证的源代码
💻 BAS
字号:
Attribute VB_Name = "modMain"
Option Explicit

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)     ''API SLEEP


Public gstrModel As String
Public gstrLocation As String
Public gstrIMEI As String
Public gstrVendorSN As String

Public gstrBatteryLocation As String
Public gstrBatteryVendor As String


Public gstrBattery1_Model As String
Public gstrBattery1 As String

Public gstrBattery2 As String
Public gstrBattery2_Model As String

Public gstrTripChargerModel As String
Public gstrTripChargerLocation As String
Public gstrTripChargerSN As String



'Print Position Control
Public gstrBaseX As String
Public gstrBaseY As String
Public gstrGap As String
Public gstrGapCusToSale As String





Public Sub Main()

     If App.PrevInstance Then
        
       MsgBox "Program are already Running!Please wait", vbCritical, "Program Start"
     
     End If
    
     
     
     ConfigInfoRead
     
     If gstrDebugMode = "1" Or gstrDebugMode = "2" Then
        SfisConnect
     End If
     
     If Dir(App.Path + "\Sfis", vbDirectory) = "" Then
        MkDir App.Path + "\Sfis"
     End If
     
     If Dir(App.Path + "\BackUp", vbDirectory) = "" Then
        MkDir App.Path + "\BackUp"
     End If
     
     If Dir(App.Path + "\BackUp\Request", vbDirectory) = "" Then
       MkDir App.Path + "\Backup\Request"
     End If
     
     If Dir(App.Path + "\BackUp\Result", vbDirectory) = "" Then
       MkDir App.Path + "\Backup\Result"
     End If
     
     Load frmMain
     frmMain.Show
        
       
       
       
End Sub


Public Sub modDeBug()

    gstrVendorSN = "CECTSN00001001"
    gstrIMEI = "351180510000001"
    gstrBattery1 = "B0000001"
    gstrBattery2 = "B000002"
    gstrTripChargerSN = "CHAGER00001"
    
End Sub
Sub Bell()
    
    Dim intI As Integer    ''僇僂儞僞

    For intI = 1 To 1
        Beep
    Next intI

End Sub


Public Sub FormatSyousu(Kylen, dLen, Ky$)
    
    Dim Dmmy!
    Dim dmy$
    Dim p
    Dim Dec$
    Dim Inte$

    Dmmy! = Val(Ky$)            '29.15
    dmy$ = LTrim(str$(Dmmy!))   '"29.15"
    p = InStr(dmy$, ".")        'p=3
    
    Select Case p
    Case 0
        dmy$ = dmy$ + "." + String$(dLen, "0")
            Ky$ = String$(Kylen - Len(dmy$), " ") + dmy$
    Case Else
        If p = 1 Then
            dmy$ = "0" + dmy$
            p = 2
        Else
            
            If p = 2 And Mid$(dmy$, 1, 1) = "-" Then
                dmy$ = "-0" + Mid$(dmy$, 2)
                p = 3
            End If
        End If
        
        Dec$ = Mid$(dmy$, p + 1, Len(dmy$) - p) + String$(dLen, "0")
        Dec$ = Mid$(Dec$, 1, dLen)
        Inte$ = String$(Kylen - dLen - 1, " ") + Mid$(dmy$, 1, p - 1)
        Inte$ = Mid$(Inte$, Len(Inte$) - (Kylen - dLen - 2), Kylen - dLen - 1)
        Ky$ = Inte$ + "." + Dec$
    End Select
    
End Sub


Public Sub Wait(intWaitTime As Integer)

    intWaitTime = intWaitTime * 10
    
    DoEvents
    
    Call Sleep(intWaitTime)    ''倶10msec
    
    DoEvents

End Sub

⌨️ 快捷键说明

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