home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / seclau / passform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-08  |  2.1 KB  |  68 lines

  1. VERSION 2.00
  2. Begin Form PassForm 
  3.    Caption         =   "Password"
  4.    ClientHeight    =   540
  5.    ClientLeft      =   2475
  6.    ClientTop       =   3495
  7.    ClientWidth     =   4230
  8.    ControlBox      =   0   'False
  9.    Height          =   945
  10.    Left            =   2415
  11.    LinkTopic       =   "Form2"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   540
  15.    ScaleWidth      =   4230
  16.    Top             =   3150
  17.    Visible         =   0   'False
  18.    Width           =   4350
  19.    Begin Label Label1 
  20.       BorderStyle     =   1  'Fixed Single
  21.       Height          =   255
  22.       Left            =   240
  23.       TabIndex        =   0
  24.       Top             =   120
  25.       Width           =   3855
  26.    End
  27. Dim PassFormPassWord As String
  28. Sub Form_GotFocus ()
  29.     PassFormPassWord = ""
  30.     PassForm.Label1.Caption = ""
  31. End Sub
  32. Sub Form_KeyPress (KeyAscii As Integer)
  33.     If KeyAscii = 13 Then
  34.         PassForm.Visible = False
  35.         If PassForm.Caption = "Master Password" Then
  36.             If PassFormPassWord = MasterPassword Then
  37.                 Call SetupMaint
  38.                 MantForm.Visible = True
  39.                 End If
  40.             Else
  41.             If PassFormPassWord = ProgramPassword Then
  42.                 X = Shell(ProgramName, 1)
  43.                 End
  44.                 Else
  45.                 MsgBox "Wrong Password", 0, "Sorry"
  46.                 Launch_Form.Visible = True
  47.                 End If
  48.             End If
  49.         End If
  50.     If KeyAscii = 8 Then
  51.         If Len(PassFormPassWord) > 0 Then PassFormPassWord = Left$(PassFormPassWord, Len(PassFormPassWord) - 1)
  52.         Else
  53.         PassFormPassWord = PassFormPassWord + Chr$(KeyAscii)
  54.         End If
  55.     PassForm.Label1.Caption = String$(Len(PassFormPassWord), "*")
  56. End Sub
  57. Sub MaskedEdit1_KeyPress (KeyAscii As Integer)
  58.     If KeyAscii = 13 Then
  59.         PassForm.Visible = False
  60.         Launch_Form.Visible = True
  61.         End If
  62. End Sub
  63. Sub Text1_KeyPress (KeyAscii As Integer)
  64.     If KeyAscii = 13 Then
  65.         PassForm.Visible = False
  66.         End If
  67. End Sub
  68.