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

📄 form_edit.frm

📁 宇迪erp,企业erp模块一
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frm_Password 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "修改口令"
   ClientHeight    =   1530
   ClientLeft      =   3930
   ClientTop       =   3015
   ClientWidth     =   4050
   Icon            =   "Form_Edit.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1530
   ScaleWidth      =   4050
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command1 
      Caption         =   "取消&C"
      Height          =   315
      Index           =   1
      Left            =   2310
      TabIndex        =   5
      Top             =   1020
      Width           =   1155
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定&D"
      Height          =   315
      Index           =   0
      Left            =   600
      TabIndex        =   4
      Top             =   1020
      Width           =   1155
   End
   Begin VB.TextBox Text1 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Index           =   1
      Left            =   1320
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   600
      Width           =   2055
   End
   Begin VB.TextBox Text1 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Index           =   0
      Left            =   1320
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   210
      Width           =   2055
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "新口令"
      Height          =   180
      Index           =   1
      Left            =   330
      TabIndex        =   1
      Top             =   660
      Width           =   540
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "旧口令"
      Height          =   180
      Index           =   0
      Left            =   330
      TabIndex        =   0
      Top             =   240
      Width           =   540
   End
End
Attribute VB_Name = "Frm_Password"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click(Index As Integer)
On Error Resume Next

Dim aDo_Password As New Recordset
If Index = 1 Then Unload Me: Exit Sub
Set aDo_Password = Conn_System.Execute("select * from HDSystem_Password")

If aDo_Password.RecordCount > 0 Then
      If Mmjm1(Trim(Text1(0).Text)) <> Trim(aDo_Password!Password) Then MsgBox "旧口令错误! ", 16: aDo_Password.Close: Text1(0).SetFocus: Exit Sub
      Conn_System.Execute "update HDSystem_Password set Password='" & Mmjm1(Trim(Text1(1).Text)) & "'"
   Else
      If Trim(Text1(0).Text) <> "" Then MsgBox "旧口令错误! ", 16: aDo_Password.Close: Text1(0).SetFocus: Exit Sub
      Conn_System.Execute "insert into HDSystem_Password(Id,Password)VALUES(1,'" & Mmjm1(Trim(Text1(1).Text)) & "')"
End If

aDo_Password.Close
Set aDo_Password = Nothing
 MsgBox "口令修改成功! ", 48
 Unload Me
If Err <> 0 Then
   MsgBox Err.Description, 16
End If

End Sub

Private Function Mmjm1(Srmm As String) As String                  '密码加密模块
   Dim Zfcte As Integer
   Mmjm1 = ""
   For jsqte = 1 To Len(Srmm)
       Zfcte = Asc(Mid(Srmm, jsqte, 1)) + Len(Srmm) + jsqte
       Mmjm1 = Mmjm1 + Mid(Trim(str(1000 + Zfcte)), 2, 3)
   Next jsqte
End Function

⌨️ 快捷键说明

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