publicmod.vb

来自「一个用vb实现的网吧管理系统,是一个vb的课程设计.」· VB 代码 · 共 44 行

VB
44
字号

Module PublicMod
    Public WithEvents NewServer As New ClsServer
    Public NewOperation As New ClsDBOperation
    Public NewUser As New ClsUser
    Public NewComputer As New ClsComputer
    Public NewSuperUser As ClsSuperUser

    Sub Main()
        Application.EnableVisualStyles()
        Application.DoEvents()
        Application.Run(New FrmLogin)
    End Sub
    Public Sub EnterTAB(ByRef KeyAscii As Short)
        If KeyAscii = 13 Then '13表示回车键
            System.Windows.Forms.SendKeys.Send("{TAB}") '转换为TAB键
        End If
    End Sub
    Public Function In_Int(ByRef KeyAscii As Short) As Boolean
        Dim i As Integer
        Dim Ch_Accept_Int(20) As String
        '可以接受的字符数组
        Ch_Accept_Int(0) = "0"
        Ch_Accept_Int(1) = "1"
        Ch_Accept_Int(2) = "2"
        Ch_Accept_Int(3) = "3"
        Ch_Accept_Int(4) = "4"
        Ch_Accept_Int(5) = "5"
        Ch_Accept_Int(6) = "6"
        Ch_Accept_Int(7) = "7"
        Ch_Accept_Int(8) = "8"
        Ch_Accept_Int(9) = "9"
        Ch_Accept_Int(10) = Chr(8)
        '检查输入字符是否在数组中
        In_Int = False
        For i = 0 To 10
            If Chr(KeyAscii) = Ch_Accept_Int(i) Then
                In_Int = True
            End If
        Next
    End Function

End Module

⌨️ 快捷键说明

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