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

📄 correctpwd.frm

📁 vb编写的opc客户端
💻 FRM
字号:
VERSION 5.00
Begin VB.Form correctPwd 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "ModifyPWD"
   ClientHeight    =   3240
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   3945
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3240
   ScaleWidth      =   3945
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox surePwd 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   2160
      PasswordChar    =   "*"
      TabIndex        =   7
      Top             =   1800
      Width           =   1575
   End
   Begin VB.TextBox newPwd 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   2160
      PasswordChar    =   "*"
      TabIndex        =   6
      Top             =   1020
      Width           =   1575
   End
   Begin VB.TextBox oldPwd 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   2160
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   240
      Width           =   1575
   End
   Begin VB.CommandButton CancelButton 
      Caption         =   "Cancel"
      Height          =   375
      Left            =   2160
      TabIndex        =   1
      Top             =   2520
      Width           =   1215
   End
   Begin VB.CommandButton OKButton 
      Caption         =   "OK"
      Height          =   375
      Left            =   600
      TabIndex        =   0
      Top             =   2520
      Width           =   1215
   End
   Begin VB.Label Label3 
      Caption         =   "Confirm"
      Height          =   375
      Left            =   240
      TabIndex        =   4
      Top             =   1800
      Width           =   1575
   End
   Begin VB.Label Label2 
      Caption         =   "NewKEY"
      Height          =   375
      Left            =   240
      TabIndex        =   3
      Top             =   1080
      Width           =   1575
   End
   Begin VB.Label Label1 
      Caption         =   "OldKEY"
      Height          =   375
      Left            =   240
      TabIndex        =   2
      Top             =   360
      Width           =   1575
   End
End
Attribute VB_Name = "correctPwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

Private Sub CancelButton_Click()
Unload Me
End Sub

Private Sub OKButton_Click()
 Dim oldpasswd As String, newpasswd As String, surepasswd As String
       Dim fso As FileSystemObject, filename As String, mytextstream As TextStream
    oldpasswd = Trim(oldPwd.Text)
    newpasswd = Trim(newPwd.Text)
    surepasswd = Trim(surePwd.Text)
    If oldpasswd <> pwd Then
        MsgBox "Your PassWord Not Match!"
        oldPwd.SetFocus
        Exit Sub
    End If
    If newpasswd <> surepasswd Then
        MsgBox "Please Confirm The New PassWord!"
        newPwd.SetFocus
        Exit Sub
    End If
         
        Set fso = New FileSystemObject
        progpath = Trim(App.Path)
        filename = progpath & "\pwd.bin"
        fso.CreateTextFile filename, True
      
        Set mytextstream = fso.OpenTextFile(filename, 2)
        mytextstream.Write newpasswd
        pwd = newpasswd
        mytextstream.Close
        
        Unload Me
End Sub

⌨️ 快捷键说明

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