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

📄 frmlogin.frm

📁 19851651gjh bhbhkjkjnnjkkj
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form frmLogin 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "服务登记-登录"
   ClientHeight    =   1410
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   3075
   Icon            =   "frmLogin.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1410
   ScaleWidth      =   3075
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Tag             =   "登录"
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   300
      Left            =   1920
      Picture         =   "frmLogin.frx":0CCA
      TabIndex        =   5
      Top             =   960
      Width           =   975
   End
   Begin VB.CommandButton cmdok 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   300
      Left            =   840
      Picture         =   "frmLogin.frx":1E3A
      TabIndex        =   4
      Top             =   960
      Width           =   975
   End
   Begin MSAdodcLib.Adodc 服务登记 
      Height          =   330
      Left            =   1800
      Top             =   0
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _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=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "服务登记"
      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 MSDataListLib.DataCombo DataCombo1 
      Bindings        =   "frmLogin.frx":2FAA
      DataSource      =   "服务登记"
      Height          =   330
      Left            =   1200
      TabIndex        =   3
      Top             =   120
      Width           =   1500
      _ExtentX        =   2646
      _ExtentY        =   582
      _Version        =   393216
      Appearance      =   0
      ListField       =   "姓名"
      Text            =   ""
   End
   Begin VB.TextBox txtPassword 
      Appearance      =   0  'Flat
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   1200
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   525
      Width           =   1500
   End
   Begin VB.Label lblLabels 
      BackStyle       =   0  'Transparent
      Caption         =   "密码(&P):"
      Height          =   255
      Index           =   1
      Left            =   240
      TabIndex        =   0
      Tag             =   "密码(&P):"
      Top             =   600
      Width           =   840
   End
   Begin VB.Label lblLabels 
      BackStyle       =   0  'Transparent
      Caption         =   "用户名(&U):"
      Height          =   255
      Index           =   0
      Left            =   240
      TabIndex        =   2
      Tag             =   "用户名(&U):"
      Top             =   240
      Width           =   960
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim X
Private Sub cmdCancel_Click()
End
End Sub
Private Sub cmdOK_Click()
On Error GoTo 1
If X = 3 Then
    MsgBox "对不起!你无权登录本系统。", , "登录"
    Unload Me
    GoTo 1
End If
If Len(DataCombo1) = 0 Then
    MsgBox "请输入用户名!", , "登录"
    GoTo 1
End If

If Len(txtPassword) = 0 Then
    MsgBox "请输入密码!", , "登录"
    GoTo 1
End If

服务登记.RecordSource = "SELECT * From mm WHERE 姓名 = '" & DataCombo1 & "' and 密码 = '" & txtPassword.Text & "'"
服务登记.Refresh
  a = 服务登记.Recordset.RecordCount
    If a = 0 And txtPassword.Text <> xtmm Then
        msg = "密码错误,你还有" & 3 - X & "次密码输入机会!"
         MsgBox msg, , "登录"
        txtPassword.SetFocus
        txtPassword.SelStart = 0
        txtPassword.SelLength = Len(txtPassword.Text)
        X = X + 1
    Else
        mz = DataCombo1
        Unload Me
        frmSplash.Show
    End If
    
Exit Sub
1
End Sub


Private Sub Form_Activate()
If ap1 = 1 Then
     nval = MsgBox("没有指定或错误数据库路径,现在要指定吗?", vbYesNo + vbQuestion, "错误")
        If nval = vbYes Then
        Form2.Show
        End If
End If
End Sub

Private Sub Form_Load()
On Error GoTo 1
Dim t1
Dim t2
xtmm = "robam080"
ap1 = 0
Open "ap.dat" For Random As #1
    Get #1, , t1
    Get #1, , t2
     Get #1, , dxfs
Close
 Drive1 = t1
 Dir1 = t2
ap = t2
acs = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + ap + "\fw.mdb;Jet OLEDB:Database Password='ROBAM8805'"
服务登记.ConnectionString = acs
服务登记.RecordSource = "mm"
服务登记.Refresh
X = 0
GoTo 2
1
    ap1 = 1
2
End Sub

⌨️ 快捷键说明

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