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

📄 frmdataenv.frm

📁 一个小型的旅行社管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmDataEnv 
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   8475
   ClientLeft      =   0
   ClientTop       =   -105
   ClientWidth     =   10665
   LinkTopic       =   "Form1"
   Picture         =   "frmDataEnv.frx":0000
   ScaleHeight     =   8475
   ScaleWidth      =   10665
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton 取消 
      Caption         =   "取消"
      Height          =   375
      Left            =   2400
      TabIndex        =   9
      Top             =   6240
      Width           =   735
   End
   Begin VB.CommandButton 确定 
      Caption         =   "确定"
      Height          =   375
      Left            =   1080
      TabIndex        =   8
      Top             =   6240
      Width           =   735
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   1680
      TabIndex        =   5
      Top             =   5040
      Width           =   1695
   End
   Begin VB.TextBox Text1 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   1680
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   5640
      Width           =   1695
   End
   Begin VB.Label Label6 
      BackStyle       =   0  'Transparent
      Caption         =   "密码"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   840
      TabIndex        =   7
      Top             =   5640
      Width           =   615
   End
   Begin VB.Label Label5 
      BackStyle       =   0  'Transparent
      Caption         =   "用户名"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   720
      TabIndex        =   6
      Top             =   5040
      Width           =   735
   End
   Begin VB.Label Label2 
      BackColor       =   &H00FFC0C0&
      BackStyle       =   0  'Transparent
      Caption         =   "系统登陆"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   20.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000C000&
      Height          =   495
      Left            =   720
      TabIndex        =   3
      Top             =   4080
      Width           =   1935
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "Exit...."
      BeginProperty Font 
         Name            =   "@MS UI Gothic"
         Size            =   20.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00004000&
      Height          =   375
      Left            =   8640
      TabIndex        =   2
      Top             =   1200
      Width           =   1095
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "旅行社集成管理系统"
      BeginProperty Font 
         Name            =   "华文彩云"
         Size            =   48
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF8080&
      Height          =   975
      Left            =   1200
      TabIndex        =   1
      Top             =   1920
      Width           =   8655
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "Load........"
      BeginProperty Font 
         Name            =   "Monotype Corsiva"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   -1  'True
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00008000&
      Height          =   255
      Left            =   2640
      TabIndex        =   0
      Top             =   4440
      Width           =   1575
   End
End
Attribute VB_Name = "frmDataEnv"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Image1_Click()

End Sub


Private Sub Label1_Click()
Unload Me
End Sub



Public rs As ADODB.Recordset
Public db As ADODB.Connection

Private Sub 取消_Click()
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Text2.SetFocus
End Sub

Private Sub 确定_Click()
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.ConnectionString = "driver={SQL Server};server=zhangwei;database=travaldb"
db.Open
rs.Open "select 用户名 from 密码表 ", db, adOpenStatic, adLockReadOnly
rs.Close
If Text1.Text <> "" Then
rs.Open "select 用户名,密码 from 密码表 where 用户名 ='" & Text2.Text & "' and 密码='" & Text1.Text & "'", db, adOpenStatic, adLockReadOnly
If rs.EOF = True And rs.BOF = True Then
n = MsgBox("密码错误或用户名不存在", vbExclamation)
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Text2.SetFocus
Else
    UserName = Text2.Text
MsgBox ("登陆成功")
Unload Me
MainFORM.Show
End If
rs.Close
Else
n = MsgBox("??????!", vbExclamation)
End If
End Sub

⌨️ 快捷键说明

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