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

📄 frmpass.frm

📁 一个机械产品(产品、部件、零件)的工时、工资及进度软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmpass 
   Caption         =   "口令更改:"
   ClientHeight    =   2565
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   2565
   ScaleWidth      =   4680
   Begin VB.CommandButton cmdexit 
      Caption         =   "中止"
      Height          =   315
      Left            =   2700
      TabIndex        =   7
      Top             =   2100
      Width           =   855
   End
   Begin VB.CommandButton cmdok 
      Caption         =   "确认"
      Height          =   315
      Left            =   1080
      TabIndex        =   6
      Top             =   2100
      Width           =   855
   End
   Begin VB.TextBox txtokpwd 
      Height          =   315
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   1500
      Width           =   2355
   End
   Begin VB.TextBox txtnewpwd 
      Height          =   315
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   840
      Width           =   2355
   End
   Begin VB.TextBox txtoldpwd 
      Height          =   315
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   270
      Width           =   2355
   End
   Begin VB.Label lblLabels 
      Caption         =   "确认口令"
      Height          =   270
      Index           =   2
      Left            =   600
      TabIndex        =   5
      Top             =   1500
      Width           =   780
   End
   Begin VB.Label lblLabels 
      Caption         =   "新口令"
      Height          =   270
      Index           =   1
      Left            =   600
      TabIndex        =   2
      Top             =   900
      Width           =   600
   End
   Begin VB.Label lblLabels 
      Caption         =   "原口令"
      Height          =   270
      Index           =   0
      Left            =   600
      TabIndex        =   1
      Top             =   420
      Width           =   720
   End
End
Attribute VB_Name = "frmpass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
    Me.Width = 4800: Me.Height = 3000
    Me.Top = (Screen.Height - Me.Height) / 2
    Me.Left = (Screen.Width - Me.Height) / 2
    
'    szserver = frmLogin.txtserver.Text
'    szdatabase = frmLogin.txtdatabase.Text
'    szuser = frmLogin.txtUser.Text
'    szpassword = frmLogin.txtpwd.Text
End Sub
Private Sub cmdOK_Click()
    Dim password  As String
   
'    szConnection = "Provider=SQLOLEDB.1;Persist Security Info=False" _
'    & ";User ID=" & szuser _
'    & ";Initial Catalog=" & szdatabase _
'    & ";Data Source=" & szserver _
'    & ";Password=" & szpassword
'    If Not oDb.State = sckOpen Then
'        oDb.ConnectionString = szConnection
'        oDb.Open
'        oDb.CursorLocation = adUseClient
'    End If
    
    password = txtoldpwd.Text
    
    Set rsTempA = oDb.Execute("select userid,pass from awork where userid='" & userid & "'")
    If rsTempA.RecordCount > 0 Then
        If (rsTempA!pass = Null And password = "") Or (Trim(rsTempA!pass) = password) Then
            Set rsTempB = oDb.Execute("UPDATE awork Set pass='" & txtnewpwd.Text & "' where userid='" & userid & "'")
            MsgBox "密码修改成功", , "密码"
            Unload Me
        Else
            If Trim(rsTempA!pass) <> password Then
                MsgBox "原密码不符!重试", , "密码"
                txtoldpwd.SetFocus
                SendKeys "{Home}+{End}"
            End If
        End If
   
    End If
End Sub
Private Sub cmdexit_Click()
    Unload Me
End Sub
Private Sub txtokpwd_LostFocus()
    If txtokpwd.Text <> txtnewpwd.Text Then
        MsgBox "二次输入的密码不同,请重输", , "密码"
    End If
End Sub

⌨️ 快捷键说明

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