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

📄 login.frm

📁 水电费收费管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form login 
   Caption         =   "欢迎进入水电收费管理系统"
   ClientHeight    =   1740
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5955
   ControlBox      =   0   'False
   Icon            =   "login.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   1740
   ScaleWidth      =   5955
   StartUpPosition =   3  '窗口缺省
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   0
      Top             =   2160
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   661
      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=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      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.CommandButton ComCAL 
      Caption         =   "取消"
      Height          =   375
      Left            =   4680
      TabIndex        =   5
      Top             =   600
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      IMEMode         =   3  'DISABLE
      Left            =   2400
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1200
      Width           =   1815
   End
   Begin VB.ComboBox Combo1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   2400
      TabIndex        =   1
      Top             =   720
      Width           =   1815
   End
   Begin VB.CommandButton ComOK 
      Caption         =   "确定"
      Height          =   375
      Left            =   4680
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   120
      Width           =   1095
   End
   Begin VB.Label Label4 
      Caption         =   "录到水电收费管系统理"
      Height          =   255
      Left            =   1320
      TabIndex        =   7
      Top             =   360
      Width           =   2895
   End
   Begin VB.Label Label3 
      Caption         =   "请选择用户名称并且输入密码,以便登"
      Height          =   255
      Left            =   1320
      TabIndex        =   6
      Top             =   120
      Width           =   3135
   End
   Begin VB.Label Label1 
      Caption         =   "用户名称(U):"
      Height          =   255
      Left            =   1080
      TabIndex        =   0
      Top             =   840
      Width           =   1215
   End
   Begin VB.Image Image1 
      Height          =   795
      Left            =   120
      Picture         =   "login.frx":000C
      Top             =   120
      Width           =   900
   End
   Begin VB.Label Label2 
      Caption         =   "密    码(P):"
      Height          =   255
      Left            =   1080
      TabIndex        =   2
      Top             =   1320
      Width           =   1215
   End
End
Attribute VB_Name = "login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit





Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
Text1.SetFocus
End If

End Sub

Private Sub ComCAL_Click()
Unload Me
Unload frmbackup

End Sub

Private Sub ComOK_Click()
Dim STR As String
Dim str1 As String

If Combo1.Text = "" Then
MsgBox "请输入用户名", vbOKOnly + vbInformation
        Exit Sub
    End If
    a = Text1.Text
    STR = "ADMIN = " + "'"
   STR = STR + Combo1 + "'"
      
     Adodc1.Recordset.MoveFirst
     Adodc1.Recordset.Find STR
    If Adodc1.Recordset.EOF Then
    MsgBox "没有此用户名", vbOKOnly + vbInformation
    Exit Sub
    End If
    bookmarklogin = Adodc1.Recordset.Bookmark
    
    On Error GoTo e:
str1 = Trim(Adodc1.Recordset.Fields("password"))
e:  If Text1.Text = Trim(str1) Then
oper1 = Combo1.Text
  SKIP.Show vbNormal
  Unload Me
 Unload frmbackup
 
 Else
 MsgBox "密码不正确,请重新输入密码", vbOKOnly + vbCritical
 End If
  
   Adodc1.Recordset.UpdateBatch
  
End Sub

Private Sub Form_Load()

Me.Top = frmbackup.Top + 3000
Me.Left = frmbackup.Left + 1200

Dim rst As New ADODB.Recordset
Dim strsql As String
strsql = "select * from LOGIN"
rst.Open strsql, config.cnZdx, adOpenStatic, adLockReadOnly
Do While Not rst.EOF
     
Combo1.AddItem "" & rst("admin")

       rst.MoveNext
    Loop
    rst.Close
  Set rst = Nothing
  Combo1.ListIndex = 0
 
    Adodc1.ConnectionString = config.cnZdx.ConnectionString
    Adodc1.RecordSource = "SELECT*FROM login"
    Adodc1.Refresh
End Sub

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
ComOK.SetFocus
End If
End Sub

⌨️ 快捷键说明

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