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

📄 frm登录.frm

📁 可以完成宾馆的日常管理功能,例如订房,登记,入住,结帐,和打印报表等
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm登录 
   Caption         =   "登录"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   465
   ClientWidth     =   5475
   Icon            =   "frm登录.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   3090
   ScaleWidth      =   5475
   StartUpPosition =   2  '屏幕中心
   Begin VB.PictureBox Picture1 
      BackColor       =   &H80000013&
      FillColor       =   &H0000FF00&
      Height          =   3855
      Left            =   0
      ScaleHeight     =   3795
      ScaleWidth      =   5955
      TabIndex        =   0
      Top             =   0
      Width           =   6015
      Begin VB.Frame Frame1 
         Height          =   15
         Left            =   480
         TabIndex        =   11
         Top             =   840
         Width           =   4095
      End
      Begin VB.TextBox Text3 
         Enabled         =   0   'False
         Height          =   270
         Left            =   4440
         TabIndex        =   10
         Top             =   2760
         Width           =   975
      End
      Begin VB.PictureBox Picture3 
         BackColor       =   &H80000013&
         Height          =   495
         Left            =   840
         ScaleHeight     =   435
         ScaleWidth      =   3675
         TabIndex        =   8
         Top             =   1680
         Width           =   3735
         Begin VB.TextBox Text2 
            Height          =   270
            IMEMode         =   3  'DISABLE
            Left            =   1920
            PasswordChar    =   "*"
            TabIndex        =   7
            Top             =   120
            Width           =   1575
         End
         Begin VB.Label Label3 
            BackColor       =   &H80000013&
            Caption         =   "密    码:"
            BeginProperty Font 
               Name            =   "楷体_GB2312"
               Size            =   12
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   120
            TabIndex        =   9
            Top             =   120
            Width           =   1815
         End
      End
      Begin VB.PictureBox Picture2 
         BackColor       =   &H80000013&
         Height          =   495
         Left            =   840
         ScaleHeight     =   435
         ScaleWidth      =   3675
         TabIndex        =   4
         Top             =   1080
         Width           =   3735
         Begin VB.TextBox Text1 
            Height          =   270
            Left            =   1920
            TabIndex        =   5
            Top             =   120
            Width           =   1575
         End
         Begin VB.Label Label2 
            BackColor       =   &H80000013&
            Caption         =   "用 户 名:"
            BeginProperty Font 
               Name            =   "楷体_GB2312"
               Size            =   12
               Charset         =   134
               Weight          =   700
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   120
            TabIndex        =   6
            Top             =   120
            Width           =   1695
         End
      End
      Begin VB.CommandButton Command2 
         BackColor       =   &H80000013&
         Caption         =   "取 消(&Q)"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3120
         MaskColor       =   &H80000013&
         Style           =   1  'Graphical
         TabIndex        =   3
         Top             =   2520
         Width           =   1215
      End
      Begin VB.CommandButton Command1 
         Default         =   -1  'True
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1080
         Picture         =   "frm登录.frx":030A
         Style           =   1  'Graphical
         TabIndex        =   2
         Top             =   2520
         Width           =   1095
      End
      Begin MSAdodcLib.Adodc Adodc1 
         Height          =   330
         Left            =   3600
         Top             =   2160
         Visible         =   0   'False
         Width           =   1935
         _ExtentX        =   3413
         _ExtentY        =   582
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   8
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   3
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   "DSN=wmtao"
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   "wmtao"
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   ""
         Caption         =   "Adodc1"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         _Version        =   393216
      End
      Begin VB.Image Image1 
         Height          =   480
         Left            =   360
         Picture         =   "frm登录.frx":1658
         Top             =   1080
         Width           =   480
      End
      Begin VB.Image Image3 
         Height          =   480
         Left            =   4560
         Picture         =   "frm登录.frx":1962
         Top             =   1440
         Width           =   480
      End
      Begin VB.Image Image2 
         Height          =   480
         Left            =   360
         Picture         =   "frm登录.frx":1A80
         Top             =   1680
         Width           =   480
      End
      Begin VB.Label Label1 
         BackColor       =   &H80000013&
         Caption         =   "宾馆管理信息系统"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   18
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1080
         TabIndex        =   1
         Top             =   360
         Width           =   3975
      End
   End
End
Attribute VB_Name = "frm登录"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub StatusBar1_PanelClick(ByVal Panel As MSComctlLib.Panel)

End Sub

Private Sub Command1_Click()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim rs1 As ADODB.Recordset
Dim rs2 As ADODB.Recordset
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
Set rs1 = New ADODB.Recordset
Set rs2 = New ADODB.Recordset
cn.Open Adodc1.ConnectionString
rs.Open "select * from 管理表 where 用户名 = '" & Text1 & "' and 密码 = '" & Text2 & "'", cn, 1, 3
If Not rs.EOF Then
   权限 = rs.Fields("权限")
   操作员 = rs.Fields("用户名")
   frmmain.Show
   Me.Hide
ElseIf (Text1.Text = "") Then
   MsgBox "用户名不能为空,请输入用户名!!!", vbOKOnly + vbExclamation, "警告"
   Text1.SetFocus
ElseIf (Text2.Text = "") Then
   MsgBox "密码不能为空,请输入密码!!!", vbOKOnly + vbExclamation, "警告"
   Text2.SetFocus
Else
   MsgBox "用户名或密码错误!!!请重新输入!!!", vbOKOnly + vbExclamation, "警告"
   Text1.Text = ""
   Text2.Text = ""
   Text1.SetFocus
End If

End Sub

Private Sub Command2_Click()
Dim i As Integer
i = MsgBox("是否确认退出?", vbYesNo, "提示")
If i = vbYes Then
Unload Me
End If
End Sub

Private Sub Image3_Click()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.Open Adodc1.ConnectionString
rs.Open "select * from 管理表 where 用户名 = '" & Text1 & "' and 密码 = '" & Text2 & "'", cn, 1, 3
If Not rs.EOF Then
   权限 = rs.Fields("权限")
   操作员 = rs.Fields("用户名")
   frmmain.Show
   Me.Hide
   ElseIf (Text1.Text = "") Then
   MsgBox "用户名不能为空,请输入用户名!!!", vbOKOnly + vbExclamation, "警告"
   Text1.SetFocus
   ElseIf (Text2.Text = "") Then
   MsgBox "密码不能为空,请输入密码!!!", vbOKOnly + vbExclamation, "警告"
   Text2.SetFocus
   Else
   MsgBox "用户名或密码错误!!!请重新输入!!!", vbOKOnly + vbExclamation, "警告"
   Text1.Text = ""
   Text2.Text = ""
   Text1.SetFocus
   End If
End Sub

Private Sub Text1_Change()
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.Open Adodc1.ConnectionString
rs.Open "select * from 管理表 where 用户名='" & Text1.Text & "'", cn, 1, 3
While Not rs.EOF
  If rs.Fields(2) = 1 Then
     Text3 = "管理员"
  Else
     Text3 = "操作员"
  End If
rs.MoveNext
Wend
End Sub

⌨️ 快捷键说明

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