home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form passwrd
- BackColor = &H00C0C0C0&
- BorderStyle = 3 'Fixed Double
- Caption = "Password Validation"
- ClientHeight = 2055
- ClientLeft = 1710
- ClientTop = 1590
- ClientWidth = 4830
- ControlBox = 0 'False
- Height = 2460
- Left = 1650
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2055
- ScaleWidth = 4830
- Top = 1245
- Width = 4950
- Begin AwareBinary fpBinary1
- BackColor = &H00C0C0C0&
- BorderStyle = 0 'No Border
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 2040
- Left = 0
- TabIndex = 0
- ThreeDFrameWidth= 5
- ThreeDInsideHighlightColor= &H00FFFFFF&
- ThreeDInsideShadowColor= &H00808080&
- ThreeDInsideStyle= 2 'Raised
- ThreeDInsideWidth= 2
- ThreeDOutsideHighlightColor= &H00FFFFFF&
- ThreeDOutsideShadowColor= &H00808080&
- ThreeDOutsideStyle= 2 'Raised
- Top = 0
- Width = 4815
- Begin AwareText fpText1
- AlignTextH = 1 'Center
- AlignTextV = 1 'Center
- BackColor = &H00C0C0C0&
- BorderStyle = 0 'No Border
- ControlType = 2 'Static
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- ForeColor = &H000000FF&
- Height = 465
- Left = 75
- TabIndex = 4
- TabStop = 0 'False
- Text = "Please enter your password below..."
- ThreeDOutsideStyle= 1 'Lowered
- ThreeDText = 2 'Embossed w/ shading
- ThreeDTextHighlightColor= &H00FFFFFF&
- ThreeDTextShadowColor= &H00000010&
- Top = 75
- Width = 4440
- End
- Begin AwareText fpText2
- AlignTextH = 1 'Center
- AlignTextV = 1 'Center
- AutoCase = 2 'Lower
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 9.75
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 390
- Left = 750
- PasswordChar = "*"
- TabIndex = 1
- ThreeDOutsideStyle= 2 'Raised
- ThreeDTextHighlightColor= &H00000014&
- ThreeDTextShadowColor= &H00000010&
- Top = 750
- Width = 2940
- End
- Begin CommandButton Command1
- Caption = "OK"
- Height = 400
- Left = 600
- TabIndex = 3
- Top = 1275
- Width = 1440
- End
- Begin CommandButton Command2
- Caption = "Cancel"
- Height = 400
- Left = 2325
- TabIndex = 2
- Top = 1275
- Width = 1440
- End
- End
- Sub Command1_Click ()
- If Not Valid_Password(selectedpassword) Then
- MsgBox "This is not the correct password. Please re-enter..."
- fptext2.Text = ""
- fptext2.SetFocus
- Else
- was_valid = True
- Me.Hide
- End If
- End Sub
- Sub Command2_Click ()
- selectedname = "default"
- Me.Hide
- End Sub
- Sub Form_Activate ()
- fptext2.Text = ""
- fptext2.SetFocus
- End Sub
- Sub Form_Load ()
- centerform Me
- End Sub
- Sub fpText2_KeyPress (keyascii As Integer)
- If keyascii = 13 Then
- If Not Valid_Password(selectedpassword) Then
- MsgBox "This is not the correct password. Please re-enter..."
- fptext2.Text = ""
- fptext2.SetFocus
- Else
- was_valid = True
- Me.Hide
- End If
- End If
- End Sub
- Function Valid_Password (word As String) As Integer
- If fptext2.Text = word Then
- Valid_Password = True
- Else
- Valid_Password = False
- End If
- End Function
-