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

📄 frm登录.frm

📁 1. 观察计算机显示系统构成
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frm登录 
   Caption         =   "用户名:admin  密码:528"
   ClientHeight    =   3630
   ClientLeft      =   60
   ClientTop       =   405
   ClientWidth     =   3420
   LinkTopic       =   "Form2"
   ScaleHeight     =   3630
   ScaleWidth      =   3420
   StartUpPosition =   3  '窗口缺省
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   600
      Top             =   3240
      Width           =   2055
      _ExtentX        =   3625
      _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=   2
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "FILE NAME=D:\桌面\客户管理系统\用户管理表.dsn"
      OLEDBString     =   ""
      OLEDBFile       =   "D:\桌面\客户管理系统\用户管理表.dsn"
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 客户信息表"
      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.TextBox Text2 
      Alignment       =   2  'Center
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      IMEMode         =   3  'DISABLE
      Left            =   1200
      MaxLength       =   6
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   570
      Width           =   1920
   End
   Begin VB.CommandButton Cmd1 
      BackColor       =   &H00FF8080&
      Caption         =   "确定(&O)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   400
      Left            =   600
      MaskColor       =   &H00FF8080&
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   1560
      UseMaskColor    =   -1  'True
      Width           =   1000
   End
   Begin VB.CommandButton Cmd2 
      BackColor       =   &H00FF8080&
      Caption         =   "退出(&X)"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   400
      Left            =   1920
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   1560
      Width           =   1000
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "frm登录.frx":0000
      Left            =   1200
      List            =   "frm登录.frx":0002
      TabIndex        =   1
      Text            =   "admin"
      Top             =   120
      Width           =   1935
   End
   Begin VB.TextBox Text1 
      DataField       =   "密码"
      DataSource      =   "Adodc1"
      Height          =   375
      Left            =   960
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   2400
      Width           =   1455
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "用户名: "
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   405
      Left            =   240
      TabIndex        =   7
      Top             =   120
      Width           =   1095
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "密  码:          "
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   240
      TabIndex        =   6
      Top             =   630
      Width           =   855
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "温馨提示:请用户登陆后修改密码。"
      ForeColor       =   &H00FF0000&
      Height          =   255
      Left            =   120
      TabIndex        =   5
      Top             =   1200
      Width           =   2895
   End
End
Attribute VB_Name = "frm登录"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public TIM As Integer

Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
  Text2.SetFocus
Else
End If
End Sub

Private Sub Form_Activate()
  Combo1.SetFocus
End Sub

Private Sub Form_Load()
  TIM = 0
  frm主窗体.StatusBar1.Panels(1) = Me.Caption
  Adodc1.RecordSource = "select * from 用户管理表 "
  Adodc1.Refresh
  If Adodc1.Recordset.RecordCount > 0 Then
    Do While Adodc1.Recordset.EOF = False
       Combo1.AddItem (Adodc1.Recordset.Fields("用户名称"))
       Adodc1.Recordset.MoveNext
    Loop
  Else
  End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
  frm主窗体.Enabled = True
  frm主窗体.StatusBar1.Panels(1) = "杨扬工作室 作者:小杨"
End Sub

Private Sub DBCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then
     Text2.SetFocus
  End If
  If KeyCode = vbKeyDown Then
     Text2.SetFocus
  End If
End Sub

Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
  If KeyCode = vbKeyReturn Then
     Cmd1.Visible = True
     Cmd1.SetFocus
  End If
  If KeyCode = vbKeyUp Then
     DBCombo1.SetFocus
     DBCombo1.SelLength = Len(DBCombo1.Text)
  End If
  If KeyCode = vbKeyDown Then
     Cmd1.Visible = True
     Cmd1.SetFocus
  End If
End Sub

Private Sub cmd1_Click()
  Dim MESSAGE As String
 Adodc1.RecordSource = "select * from 用户管理表 where (用户管理表.用户名称  like " + Chr(34) + Combo1.Text + Chr(34) + ")"
 Adodc1.Refresh
       Adodc1.RecordSource = "select * from 用户管理表 where 用户名称='" + Combo1.Text + "'"
       Adodc1.Refresh
       If Adodc1.Recordset.RecordCount > 0 Then
              If Combo1.Text <> "" And Trim(Text2.Text) = Trim(Text1.Text) Then
              frm主窗体.StatusBar1.Panels(2).Text = "当前系统用户:" & Trim(Combo1.Text)
              Name1 = Trim(Combo1.Text)
              frm主窗体.Check1.Value = Adodc1.Recordset.Fields("基本信息管理")
              frm主窗体.Check2.Value = Adodc1.Recordset.Fields("客户信息管理")
              frm主窗体.Check3.Value = Adodc1.Recordset.Fields("客户信息查询")
              frm主窗体.Check5.Value = Adodc1.Recordset.Fields("系统设置")
              Load frm主窗体
              frm主窗体.Show
              Unload Me
              Else
              MsgBox "没有此操作员的信息或者输入的密码错误,请您确认后重新输入"
              Text2.Text = ""
              Text2.SetFocus
              End If
       Else
            MsgBox "没有此操作员的信息或者输入的密码错误,请您确认后重新输入"
            Combo1.Text = ""
            Text2.Text = "'"
            Combo1.SetFocus
       End If
End Sub

Private Sub cmd2_Click()
  End
End Sub

⌨️ 快捷键说明

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