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

📄 form_setresetstockpwd.frm

📁 仓库扫描管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form form_setResetStockPwd 
   BackColor       =   &H00C0FFFF&
   Caption         =   "密码设置"
   ClientHeight    =   3840
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4905
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   ScaleHeight     =   3840
   ScaleWidth      =   4905
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtpwd2 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   1680
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   1560
      Width           =   2415
   End
   Begin VB.TextBox txtpwd1 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   1680
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   720
      Width           =   2415
   End
   Begin VB.CommandButton cmdClose 
      Caption         =   "&C关闭"
      Height          =   375
      Left            =   2640
      TabIndex        =   3
      Top             =   2640
      Width           =   1095
   End
   Begin VB.CommandButton cmdConfirm 
      Caption         =   "&O确定"
      Height          =   375
      Left            =   600
      TabIndex        =   2
      Top             =   2640
      Width           =   1095
   End
   Begin VB.Label Label2 
      BackColor       =   &H00C0FFFF&
      Caption         =   "密码确认:"
      Height          =   375
      Left            =   480
      TabIndex        =   5
      Top             =   1560
      Width           =   975
   End
   Begin VB.Label Label1 
      BackColor       =   &H00C0FFFF&
      Caption         =   "密      码:"
      Height          =   375
      Left            =   480
      TabIndex        =   4
      Top             =   720
      Width           =   1095
   End
End
Attribute VB_Name = "form_setResetStockPwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdClose_Click()
    Unload Me
End Sub

Private Sub cmdConfirm_Click()
    If Me.txtpwd1.Text <> Me.txtpwd2.Text Then
        MsgBox "两个密码不一致,请重新输入!", vbCritical, "警告"
        Me.txtpwd2.SetFocus
        Exit Sub
    End If
    If Me.txtpwd1.Text = "" Then
        MsgBox "密码不能为空!", vbCritical, "警告"
        Me.txtpwd1.SetFocus
        Exit Sub
    End If
    Dim sql As String
'   先删除,再新增
    On Error GoTo errprompt
    wrks.BeginTrans
    sql = "delete from hp_sysParas where (((hp_sysParas.paraCode)='resetStockPwd')) "
    g_db.Execute (sql)
    sql = "  INSERT INTO hp_sysParas ( paraCode, paraValue, paraDesc ) values('resetStockPwd','" + Me.txtpwd1.Text + "','清零密码')  "
    g_db.Execute (sql)
    wrks.CommitTrans
    
    MsgBox "设置成功!", vbInformation, "提示"
    Exit Sub
errprompt:
    wrks.Rollback
    Me.MousePointer = 0
    MsgBox "操作失败!", vbCritical, "警告"
End Sub

Private Sub Form_Load()
    Me.Left = (Screen.Width - Me.Width) / 2
    Me.Top = (Screen.Height - Me.Height) / 2
End Sub

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

Private Sub txtpwd1_KeyDown(KeyCode As Integer, Shift As Integer)
 If KeyCode = vbKeyReturn Then     '按回车键
    Me.txtpwd2.SetFocus
 End If
End Sub

Private Sub txtpwd2_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn Then     '按回车键
       Me.cmdConfirm.SetFocus
    End If
End Sub

⌨️ 快捷键说明

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