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

📄 frmmmsz.frm

📁 petrostation + sysytem
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmMMSZ 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "密码设置"
   ClientHeight    =   5520
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   7485
   Icon            =   "frmMMSZ.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmMMSZ.frx":29C12
   ScaleHeight     =   5520
   ScaleWidth      =   7485
   StartUpPosition =   2  '屏幕中心
   Begin MSAdodcLib.Adodc adoMMSZ 
      Height          =   615
      Left            =   5760
      Top             =   4440
      Visible         =   0   'False
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   1085
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Password=ecc;Persist Security Info=True;User ID=sa;Initial Catalog=PetrolStation System;Data Source=(local)"
      OLEDBString     =   "Provider=SQLOLEDB.1;Password=ecc;Persist Security Info=True;User ID=sa;Initial Catalog=PetrolStation System;Data Source=(local)"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from PS_Users"
      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 Command2 
      Caption         =   "退  出"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   3720
      TabIndex        =   9
      Top             =   4440
      Width           =   1935
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确  认"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   1200
      TabIndex        =   8
      Top             =   4440
      Width           =   1935
   End
   Begin VB.TextBox Text3 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   3120
      PasswordChar    =   "*"
      TabIndex        =   7
      Top             =   3240
      Width           =   2415
   End
   Begin VB.TextBox Text2 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   3120
      PasswordChar    =   "*"
      TabIndex        =   6
      Top             =   2400
      Width           =   2415
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   3120
      TabIndex        =   5
      Top             =   1560
      Width           =   2415
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "frmMMSZ.frx":368DC
      Left            =   3120
      List            =   "frmMMSZ.frx":368DE
      TabIndex        =   4
      Top             =   840
      Width           =   2415
   End
   Begin VB.Label Label4 
      BackStyle       =   0  'Transparent
      Caption         =   "请 确 认:"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1200
      TabIndex        =   3
      Top             =   3360
      Width           =   1335
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "新 密 码:"
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   1200
      TabIndex        =   2
      Top             =   2520
      Width           =   1335
   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          =   375
      Left            =   1200
      TabIndex        =   1
      Top             =   1680
      Width           =   1335
   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          =   375
      Left            =   1200
      TabIndex        =   0
      Top             =   840
      Width           =   1335
   End
End
Attribute VB_Name = "frmMMSZ"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
    adoMMSZ.CommandType = adCmdText
    adoMMSZ.RecordSource = " select 用户 ,密码 from PS_Users where 用户='" _
                        & Trim(Combo1.Text) & "'"
    adoMMSZ.Refresh
    With adoMMSZ.Recordset
        If .RecordCount < 1 Then GoTo myerr
        .MoveFirst
        DoEvents
        strPwd = !密码
        If Trim(Text1.Text) <> strPwd Then     '输入的原密码错误
            Dim a
            a = MsgBox("对不起,您输入的密码错误!", vbInformation, "提示")
            Text1.SetFocus
            GoTo myerr
        End If
        If Trim(Text2.Text) <> Trim(Text3.Text) Then
            If MsgBox("对不起,您两次输入的密码不一致,请重新输入!", _
                        vbInformation, "提示") = vbYes Then
            End If
            Text2.SetFocus
            GoTo myerr
        End If
    End With
    adoMMSZ.Recordset.Fields(1) = Trim(Trim(Text3.Text))
    adoMMSZ.Recordset.Update
    adoMMSZ.Refresh
    If MsgBox("密码修改成功!", vbInformation, "提示") = vbOK Then
        frmMain.Hide
        frmMain.Show
        Unload Me
    End If
myerr:
End Sub

Private Sub Command2_Click()
Unload Me

End Sub

Private Sub Form_Load()
    adoMMSZ.CommandType = adCmdText
    adoMMSZ.RecordSource = "select * from PS_Users"
    adoMMSZ.Refresh
    With adoMMSZ.Recordset
    If .RecordCount > 0 Then
        .MoveFirst
        
        Do While Not .EOF
            DoEvents
            Combo1.AddItem (!用户)
            .MoveNext
        Loop
    Combo1.ListIndex = 0
    End If
    End With
End Sub


Private Sub Form_Unload(Cancel As Integer)
frmMain.Enabled = True
frmMain.Show
End Sub



⌨️ 快捷键说明

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