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

📄 form1.frm

📁 这是一个VB开发的题库管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H80000018&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "题库系统"
   ClientHeight    =   1920
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6750
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1920
   ScaleWidth      =   6750
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text2 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   2280
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   1080
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   2280
      TabIndex        =   3
      Top             =   480
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "进入系统"
      Height          =   975
      Left            =   4560
      TabIndex        =   0
      Top             =   480
      Width           =   1335
   End
   Begin VB.Label Label2 
      BackColor       =   &H80000018&
      Caption         =   "密码"
      Height          =   375
      Left            =   600
      TabIndex        =   2
      Top             =   1080
      Width           =   975
   End
   Begin VB.Label Label1 
      BackColor       =   &H80000018&
      Caption         =   "用户名"
      Height          =   255
      Left            =   600
      TabIndex        =   1
      Top             =   480
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command1_Click()
mname = Text1.Text
pass = Text2.Text
Dim mycn As New ADODB.Connection
Dim myrs As New ADODB.Recordset
Set myrs = New ADODB.Recordset
mycn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=kygl.mdb;"
myrs.open "SELECT * FROM [user] where (user.user)='" + mname + "';", mycn, adOpenKeyset, adLockOptimistic

If myrs.BOF = True And myrs.EOF = True Then

MsgBox "查无此人", , "登陆信息"
Else
 
     
     If myrs("pass") = pass Then
        
         ''''''''''''''''''''''''''''''''''''''''''
        MsgBox "恭喜你,登陆成功!", , "登陆信息"
        user = myrs("user")
                 
          Form2.Show
         
         Unload Me
        
       
           '''''''''''''''''''''''''''''''''''''''''''''''''''
     Else
        MsgBox "密码不正确", , "登陆信息"
     End If
  
 
  End If
    

End Sub





⌨️ 快捷键说明

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