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

📄 管理员登录窗口.frm

📁 遗传算法背包问题的论文电子图书。不错
💻 FRM
字号:
VERSION 5.00
Begin VB.Form admin_log 
   Caption         =   "管理员登录"
   ClientHeight    =   4320
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6030
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4320
   ScaleWidth      =   6030
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton cmdcacel 
      Caption         =   "取消"
      Height          =   495
      Left            =   4200
      TabIndex        =   5
      Top             =   2520
      Width           =   1095
   End
   Begin VB.CommandButton cmdok 
      Caption         =   "登录"
      Height          =   495
      Left            =   3000
      TabIndex        =   4
      Top             =   2520
      Width           =   1095
   End
   Begin VB.TextBox txtpassword 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   3840
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1800
      Width           =   1335
   End
   Begin VB.TextBox txtusername 
      Height          =   495
      Left            =   3840
      TabIndex        =   1
      Top             =   960
      Width           =   1335
   End
   Begin VB.Label Label2 
      Caption         =   "密码:"
      Height          =   375
      Left            =   2880
      TabIndex        =   2
      Top             =   1920
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "用户名:"
      Height          =   375
      Left            =   2880
      TabIndex        =   0
      Top             =   1080
      Width           =   855
   End
   Begin VB.Image Image1 
      Height          =   2130
      Left            =   600
      Picture         =   "管理员登录窗口.frx":0000
      Top             =   960
      Width           =   2130
   End
End
Attribute VB_Name = "admin_log"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdcacel_Click()
ok = False
Me.Hide
End Sub
Private Sub cmdOK_Click()
 Dim strSQL As String
 If cmdok = True Then
        Set rs = cn.Execute("select * from user_info where user_ID = '" & txtusername.Text & "'", adCmdText)
        If rs.EOF Then
                MsgBox ("用户名错误,该用户不存在!")
                txtusername.SetFocus
                SendKeys "{home}+{end}"
        Else
            If txtpassword.Text <> Trim(rs.Fields(2).Value) Then
                MsgBox ("无效的密码,请重试!")
                txtpassword.SetFocus
                SendKeys "{home}+{end}"
            Else
                loginsucceeded = True
                Unload Me
                sys_info.Show
                admin_log.Hide
            End If
        End If
    End If
End Sub
Private Sub Form_Load()
link
End Sub

⌨️ 快捷键说明

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