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

📄 pwdform.frm

📁 e-maill文件加密程序完整的源代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form PwdForm 
   Appearance      =   0  'Flat
   BackColor       =   &H000000FF&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Enter Password"
   ClientHeight    =   840
   ClientLeft      =   2544
   ClientTop       =   2796
   ClientWidth     =   4464
   ControlBox      =   0   'False
   BeginProperty Font 
      Name            =   "System"
      Size            =   9.6
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H00000000&
   MaxButton       =   0   'False
   MinButton       =   0   'False
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   3.5
   ScaleMode       =   4  'Character
   ScaleWidth      =   37.2
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox GetPwd 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0C0C0&
      ForeColor       =   &H00000000&
      Height          =   240
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   4104
   End
End
Attribute VB_Name = "PwdForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' StealthMail - PwdForm.FRM
' Copyright Patterson Programming, 1996-1999

Dim Ppos2%

Private Sub Form_Load()
    PwdForm.Left = (Screen.Width - PwdForm.Width) / 2
End Sub

Private Sub GetPwd_keypress(Keyascii As Integer)

    '* Set the font on this form to system

    If Keyascii = 13 Then
        Keyascii = 0

        If verify% = -1 Then
            Unload PwdForm
            If Not CmpPwd%() Then
                Beep
                MsgBox1 "Passwords do not match!", 0, "Error"
                For i% = 0 To 31: MasterPwd(i%) = 32: Next
                For i% = 0 To 31: password2(i%) = 32: Next
                MasterPwdFlag = 0
                Ppos% = 0
                MainForm.Enabled = -1
                Exit Sub
            End If
            '* test for password
            If ScanPwd%() Then MasterPwdFlag = -1
            For i% = 0 To 31: password2(i%) = 32: Next
            MainForm.Enabled = -1
            Exit Sub
        End If

        '* verify flags
        '* don't verify password
        If (KeysFound = -1) And (AvoidVerify = -1) Then
            '* test for password
            If ScanPwd%() Then MasterPwdFlag = -1
            For i% = 0 To 31: password2(i%) = 32: Next
            MainForm.Enabled = -1
            KeysFound = 0: AvoidVerify = 0
            Unload PwdForm
            Exit Sub
        End If

        PwdForm.Caption = "Re-Enter To Verify"
        PwdForm.GetPwd.Text = ""

        For i% = 0 To 31: password2(i%) = MasterPwd(i%): Next
        For i% = 0 To 31: MasterPwd(i%) = 32: Next
        Ppos2% = Ppos%
        Ppos% = 0

        verify% = -1
        Exit Sub

    Else
        Keyascii = Asc(UCase$(Chr$(Keyascii)))
        If Keyascii = 8 And Ppos% > 0 Then
            Ppos% = Ppos% - 1
            MasterPwd(Ppos%) = 32

        Else
            '* allow letters, numerals, and punctuation
            If Keyascii > 31 And Keyascii < 96 Then
                '* accept 32 characters
                '* can be longer with little effort
                If Ppos% < 32 Then
                    MasterPwd(Ppos%) = Keyascii
                    Ppos% = Ppos% + 1
                    Keyascii = 42
                Else
                    Keyascii = 0
                    Beep
                End If
            Else
                Keyascii = 0
                Beep
            End If
        End If
    End If

End Sub

Private Function CmpPwd%()
    CmpFlag% = 0
    If Ppos% <> Ppos2% Then
        CmpFlag% = -1
    Else
        For i% = 0 To Ppos% - 1
            If MasterPwd(i%) <> password2(i%) Then
                CmpFlag% = -1
            End If
        Next
    End If
    CmpPwd% = (Not CmpFlag%)
End Function

⌨️ 快捷键说明

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