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

📄 frmwelcome.frm

📁 录像出租系统源代码 录像出租公司都有库存的录像以备出租。每盘录像用分类号唯一标识。同一盘录像有多份拷贝
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmWelcome 
   Caption         =   "登录界面 "
   ClientHeight    =   4695
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5925
   LinkTopic       =   "Form1"
   ScaleHeight     =   4695
   ScaleWidth      =   5925
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdCheck 
      Caption         =   "登   录"
      Height          =   495
      Left            =   480
      TabIndex        =   10
      Top             =   3720
      Width           =   1335
   End
   Begin VB.CommandButton cmdExit 
      Caption         =   "退    出"
      Height          =   495
      Left            =   3600
      TabIndex        =   9
      Top             =   3720
      Width           =   1335
   End
   Begin VB.OptionButton Option1 
      Caption         =   "Option1"
      Height          =   195
      Left            =   1560
      TabIndex        =   6
      Top             =   2760
      Value           =   -1  'True
      Width           =   255
   End
   Begin VB.OptionButton Option2 
      Caption         =   "Option1"
      Height          =   195
      Left            =   3720
      TabIndex        =   5
      Top             =   2760
      Width           =   255
   End
   Begin VB.TextBox txtPass 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   2160
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   1920
      Width           =   2535
   End
   Begin VB.TextBox txtId 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   2160
      TabIndex        =   2
      Top             =   1080
      Width           =   2535
   End
   Begin VB.Label Label5 
      Caption         =   "会员"
      Height          =   255
      Left            =   3600
      TabIndex        =   8
      Top             =   3120
      Width           =   495
   End
   Begin VB.Label Label4 
      Caption         =   "管理员"
      Height          =   255
      Left            =   1440
      TabIndex        =   7
      Top             =   3120
      Width           =   735
   End
   Begin VB.Label Label3 
      Caption         =   "密 码: "
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   840
      TabIndex        =   3
      Top             =   1920
      Width           =   855
   End
   Begin VB.Label Label2 
      Caption         =   "ID: "
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   960
      TabIndex        =   1
      Top             =   1080
      Width           =   615
   End
   Begin VB.Label Label1 
      Caption         =   "欢迎使用录像出租系统"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   18
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   960
      TabIndex        =   0
      Top             =   240
      Width           =   3615
   End
End
Attribute VB_Name = "frmWelcome"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Database '设置变量
Dim rs As Recordset
Private Sub cmdCheck_Click()
If txtId.Text Like "" Then
MsgBox "对不起,ID不能为空!", vbOKOnly + vbExclamation, "错误"
txtId.SetFocus
Exit Sub
End If
If Option1.Value = True Then
Set db = OpenDatabase("Haiyu.mdb")
Set rs = db.OpenRecordset("SELECT * FROM Admin")
rs.MoveFirst
Do Until rs.EOF
If rs!ID = txtId.Text And rs!密码 = txtPass.Text Then
Unload Me
frmAdmin.Show
Exit Sub
Else
rs.MoveNext
End If
Loop
MsgBox "对不起,您输入的ID或密码不正确!", vbOKOnly + vbExclamation, "错误"
txtId.Text = ""
txtPass.Text = ""
txtId.SetFocus
ElseIf Option2.Value = True Then
Set db = OpenDatabase("Haiyu.mdb")
Set rs = db.OpenRecordset("SELECT * FROM Customer")
rs.MoveFirst
Do Until rs.EOF
If rs!ID = txtId.Text And rs!密码 = txtPass.Text Then
ID = Val(txtId.Text)
Unload Me
frmCustomer.Show
Exit Sub
Else
rs.MoveNext
End If
Loop
MsgBox "对不起,您输入的ID或密码不正确!", vbOKOnly + vbExclamation, "错误"
txtId.Text = ""
txtPass.Text = ""
txtId.SetFocus
End If
End Sub

Private Sub cmdExit_Click()
Dim response
response = MsgBox("是否退出?", vbOKCancel + vbQuestion, "退出")
If response = 1 Then
End
End If
End Sub

⌨️ 快捷键说明

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