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

📄 frmsplash.frm

📁 这是我们公司的题库管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Name            =   "宋体"
            Size            =   32.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   645
         Left            =   2670
         TabIndex        =   13
         Tag             =   "1055"
         Top             =   1200
         Width           =   1320
      End
      Begin VB.Label lblCompanyProduct 
         AutoSize        =   -1  'True
         Caption         =   "公司产品"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   18
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         Left            =   2505
         TabIndex        =   12
         Tag             =   "1054"
         Top             =   765
         Width           =   1500
      End
      Begin VB.Label lblPlatform 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         Caption         =   "平台"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   15.75
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   6345
         TabIndex        =   11
         Tag             =   "1053"
         Top             =   2400
         Width           =   660
      End
      Begin VB.Label lblVersion 
         Alignment       =   1  'Right Justify
         AutoSize        =   -1  'True
         Caption         =   "版本"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   6495
         TabIndex        =   10
         Tag             =   "1052"
         Top             =   2760
         Width           =   510
      End
      Begin VB.Label lblWarning 
         Caption         =   "警告"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   8.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   300
         TabIndex        =   7
         Tag             =   "1051"
         Top             =   3720
         Width           =   6855
      End
      Begin VB.Label lblCompany 
         Caption         =   "公司"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   8.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   4710
         TabIndex        =   9
         Tag             =   "1050"
         Top             =   3330
         Width           =   2415
      End
      Begin VB.Label lblCopyright 
         Caption         =   "版权"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   8.25
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   4710
         TabIndex        =   8
         Tag             =   "1049"
         Top             =   3120
         Width           =   2415
      End
   End
End
Attribute VB_Name = "frmSplash"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpbuffer As String, nSize As Long) As Long

Public OK As Boolean
Private Sub Form_Load()
    Dim sBuffer As String
    Dim lSize As Long

    'LoadResStrings Me

    sBuffer = Space$(255)
    lSize = Len(sBuffer)
    Call GetUserName(sBuffer, lSize)
    If lSize > 0 Then
        txtUserName.Text = Left$(sBuffer, lSize)
    Else
        txtUserName.Text = vbNullString
    End If
    
    txtUserName.SelStart = 0
    txtUserName.SelLength = Len(txtUserName.Text)
    
    Label3.Caption = "版本 " & App.Major & "." & App.Minor & "." & App.Revision
    TMaxAni1.FileName = App.Path & "\angel.GIF"
    TMaxAni1.ShowGif
    TMaxAni1.Visible = True
    
    LoadResStrings Me
    Label3.Caption = "版本号: " & App.Major & "." & App.Minor & "." & App.Revision
    Label5.Caption = App.Title
    Label5.Font.Bold = True
    Label5.Font.Size = 18
End Sub

Private Sub cmdCancel_Click()
    OK = False
    Me.Hide
End Sub


Private Sub cmdOK_Click()
    If txtUserName.Text <> "" Then
        userName = txtUserName.Text
        
        Set cnn = New Connection
        cnn.Open sConnect
        Set rs = New Recordset
        rs.CursorLocation = adUseClient
        
        sSQL = "select * from USER_PASSWORD where USER_NAME = '" & txtUserName.Text & "'"
        rs.Open sSQL, cnn, adOpenForwardOnly, adLockReadOnly
        
        If rs.EOF Then
            MsgBox "该用户不存在,请输入正确的用户名!", vbInformation + vbOKOnly
            txtPassword.Text = ""
            txtUserName.Text = ""
            txtUserName.SetFocus
        Else
            userPW = rs!USER_PW
            userGroupId = rs!GROUP_ID
            rs.Close
            
            If txtPassword.Text = userPW Then
                'If Option1.Value = True Then
                '    categoryId = 1
                'ElseIf Option2.Value = True Then
                '    categoryId = 2
                'ElseIf Option3.Value = True Then
                '    categoryId = 3
                'End If
                OK = True
                Me.Hide
            Else
                MsgBox "密码错误,再试一次!", , "登录"
                txtPassword.SetFocus
                txtPassword.SelStart = 0
                txtPassword.SelLength = Len(txtPassword.Text)
            End If
        End If
    Else
        MsgBox "请输入用户名!", vbInformation + vbOKOnly
    End If
End Sub

Private Sub Form_Terminate()
On Error Resume Next
    If Not rs Is Nothing Then
        rs.Close
        Set rs = Nothing
    End If
    If Not cnn Is Nothing Then
        cnn.Close
        Set cnn = Nothing
    End If
End Sub

⌨️ 快捷键说明

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