home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Program_La2077787312007.psc / Program_Launcher / Forms / frmChangePW.frm < prev    next >
Text File  |  2007-08-01  |  7KB  |  231 lines

  1. VERSION 5.00
  2. Begin VB.Form frmChangePW 
  3.    BackColor       =   &H00FFC0C0&
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    ClientHeight    =   2295
  6.    ClientLeft      =   45
  7.    ClientTop       =   -60
  8.    ClientWidth     =   4215
  9.    ControlBox      =   0   'False
  10.    Icon            =   "frmChangePW.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   2295
  15.    ScaleWidth      =   4215
  16.    ShowInTaskbar   =   0   'False
  17.    StartUpPosition =   2  'CenterScreen
  18.    Begin VB.PictureBox Picture1 
  19.       Appearance      =   0  'Flat
  20.       BackColor       =   &H80000005&
  21.       BorderStyle     =   0  'None
  22.       ForeColor       =   &H80000008&
  23.       Height          =   2055
  24.       Left            =   120
  25.       ScaleHeight     =   2055
  26.       ScaleWidth      =   3975
  27.       TabIndex        =   0
  28.       Top             =   120
  29.       Width           =   3975
  30.       Begin VB.TextBox txtNoPW 
  31.          Alignment       =   2  'Center
  32.          Appearance      =   0  'Flat
  33.          BackColor       =   &H00E0E0E0&
  34.          ForeColor       =   &H00FF0000&
  35.          Height          =   285
  36.          IMEMode         =   3  'DISABLE
  37.          Left            =   1980
  38.          Locked          =   -1  'True
  39.          TabIndex        =   12
  40.          Text            =   """Blank at the moment"""
  41.          Top             =   480
  42.          Visible         =   0   'False
  43.          Width           =   1875
  44.       End
  45.       Begin VB.CommandButton cmdCancel 
  46.          Caption         =   "&Cancel"
  47.          Height          =   375
  48.          Left            =   2940
  49.          TabIndex        =   6
  50.          Top             =   1560
  51.          Width           =   915
  52.       End
  53.       Begin VB.CommandButton cmdOK 
  54.          Caption         =   "&OK"
  55.          Height          =   375
  56.          Left            =   1980
  57.          TabIndex        =   5
  58.          Top             =   1560
  59.          Width           =   915
  60.       End
  61.       Begin VB.TextBox txtExistingPassword 
  62.          Appearance      =   0  'Flat
  63.          ForeColor       =   &H00FF0000&
  64.          Height          =   285
  65.          IMEMode         =   3  'DISABLE
  66.          Left            =   1980
  67.          PasswordChar    =   "*"
  68.          TabIndex        =   4
  69.          Top             =   480
  70.          Width           =   1875
  71.       End
  72.       Begin VB.TextBox txtNewPassword1 
  73.          Appearance      =   0  'Flat
  74.          ForeColor       =   &H00FF0000&
  75.          Height          =   285
  76.          IMEMode         =   3  'DISABLE
  77.          Left            =   1980
  78.          PasswordChar    =   "*"
  79.          TabIndex        =   3
  80.          Top             =   840
  81.          Width           =   1875
  82.       End
  83.       Begin VB.TextBox txtNewPassword2 
  84.          Appearance      =   0  'Flat
  85.          ForeColor       =   &H00FF0000&
  86.          Height          =   285
  87.          IMEMode         =   3  'DISABLE
  88.          Left            =   1980
  89.          PasswordChar    =   "*"
  90.          TabIndex        =   2
  91.          Top             =   1200
  92.          Width           =   1875
  93.       End
  94.       Begin VB.TextBox Text1 
  95.          Height          =   315
  96.          IMEMode         =   3  'DISABLE
  97.          Left            =   1980
  98.          TabIndex        =   1
  99.          Top             =   60
  100.          Visible         =   0   'False
  101.          Width           =   1875
  102.       End
  103.       Begin VB.Label lblLabels 
  104.          Alignment       =   2  'Center
  105.          AutoSize        =   -1  'True
  106.          BackStyle       =   0  'Transparent
  107.          Caption         =   "Change Screen Protector Password"
  108.          BeginProperty Font 
  109.             Name            =   "MS Sans Serif"
  110.             Size            =   8.25
  111.             Charset         =   0
  112.             Weight          =   700
  113.             Underline       =   0   'False
  114.             Italic          =   0   'False
  115.             Strikethrough   =   0   'False
  116.          EndProperty
  117.          ForeColor       =   &H00FF0000&
  118.          Height          =   195
  119.          Index           =   5
  120.          Left            =   480
  121.          TabIndex        =   11
  122.          Top             =   120
  123.          Width           =   3030
  124.       End
  125.       Begin VB.Label Label1 
  126.          BackColor       =   &H00FFFFFF&
  127.          Caption         =   "Enter Existing Password"
  128.          Height          =   255
  129.          Left            =   120
  130.          TabIndex        =   10
  131.          Top             =   480
  132.          Width           =   1815
  133.       End
  134.       Begin VB.Label Label2 
  135.          BackColor       =   &H00FFFFFF&
  136.          Caption         =   "Enter New Password"
  137.          Height          =   255
  138.          Left            =   120
  139.          TabIndex        =   9
  140.          Top             =   900
  141.          Width           =   1635
  142.       End
  143.       Begin VB.Label Label3 
  144.          BackColor       =   &H00FFFFFF&
  145.          Caption         =   "Confirm New Password"
  146.          Height          =   255
  147.          Left            =   120
  148.          TabIndex        =   8
  149.          Top             =   1260
  150.          Width           =   1815
  151.       End
  152.       Begin VB.Label Label4 
  153.          BackStyle       =   0  'Transparent
  154.          Caption         =   "Do not use space / linefeed as password"
  155.          ForeColor       =   &H00FF0000&
  156.          Height          =   435
  157.          Left            =   120
  158.          TabIndex        =   7
  159.          Top             =   1560
  160.          Width           =   1755
  161.       End
  162.    End
  163. End
  164. Attribute VB_Name = "frmChangePW"
  165. Attribute VB_GlobalNameSpace = False
  166. Attribute VB_Creatable = False
  167. Attribute VB_PredeclaredId = True
  168. Attribute VB_Exposed = False
  169. Option Explicit
  170.  
  171. Private Sub Form_Load()
  172. Dim strPW As String
  173. strPW = ReadSetting("Default", True)
  174. Text1.Text = strPW
  175.  
  176. If strPW = vbNullString Then
  177. txtNoPW.Visible = True
  178. End If
  179.  
  180. End Sub
  181.  
  182. Private Sub cmdOK_Click()
  183.  
  184. Dim strTemp As String
  185. Dim strPW As String
  186. Dim strNewPW As String
  187. strPW = ReadSetting("Default", True)
  188. 'strNewPW = LCase(txtNewPassword2.Text)
  189. strNewPW = txtNewPassword2.Text
  190.     
  191.     'checks to see if you type in the correct password in the existing password field
  192.     'If LCase(strPW) = LCase(txtExistingPassword.Text) Then
  193.     If strPW = txtExistingPassword.Text Then
  194.  
  195.         'checks the match of the new passwords
  196.         'If LCase(txtNewPassword1.Text) = strNewPW Then
  197.         If txtNewPassword1.Text = strNewPW Then
  198.             Dim PWpath As String
  199.             PWpath = inifilepw
  200.             If Len(Dir(PWpath)) <> 0 Then Kill PWpath
  201.  
  202.             WriteSetting "Default", strNewPW, True
  203.             MsgBox "Password changed!", 8, "Password Verfication"
  204.         
  205.         Else
  206.             MsgBox "The New Passwords Do Not Match", 8, "Password Error"
  207.             txtNewPassword1.SetFocus
  208.             Exit Sub
  209.         
  210.         End If
  211.         
  212.     Else
  213.         MsgBox "The Existing Password is Incorrect or Altered!", 8, "Password Error"
  214.         txtExistingPassword.SetFocus
  215.         Exit Sub
  216.         
  217.     End If
  218.     
  219.     Unload Me
  220.     DoEvents
  221.     
  222. End Sub
  223.  
  224. Private Sub cmdCancel_Click()
  225.     Unload Me
  226. End Sub
  227.  
  228. Private Sub txtNoPW_GotFocus()
  229. txtNewPassword1.SetFocus
  230. End Sub
  231.