home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / VB6ProAppl2043501202007.psc / VB6ProApplicationCreato / frmLogin.frm < prev    next >
Text File  |  2007-01-20  |  3KB  |  141 lines

  1. VERSION 5.00
  2. Begin VB.Form frmLogin 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Password"
  5.    ClientHeight    =   2175
  6.    ClientLeft      =   3825
  7.    ClientTop       =   3750
  8.    ClientWidth     =   3435
  9.    ControlBox      =   0   'False
  10.    Icon            =   "frmLogin.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   1285.063
  15.    ScaleMode       =   0  'User
  16.    ScaleWidth      =   3225.278
  17.    ShowInTaskbar   =   0   'False
  18.    StartUpPosition =   2  'CenterScreen
  19.    Begin VB.Frame Frame1 
  20.       Height          =   25
  21.       Left            =   180
  22.       TabIndex        =   5
  23.       Top             =   1020
  24.       Width           =   3174
  25.    End
  26.    Begin VB.CommandButton cmdOK 
  27.       Caption         =   "&OK"
  28.       Default         =   -1  'True
  29.       Height          =   390
  30.       Left            =   1140
  31.       TabIndex        =   2
  32.       Top             =   1680
  33.       Width           =   1020
  34.    End
  35.    Begin VB.CommandButton cmdCancel 
  36.       Cancel          =   -1  'True
  37.       Caption         =   "&Cancel"
  38.       Height          =   390
  39.       Left            =   2295
  40.       TabIndex        =   3
  41.       Top             =   1680
  42.       Width           =   1020
  43.    End
  44.    Begin VB.TextBox txtPassword 
  45.       Height          =   345
  46.       IMEMode         =   3  'DISABLE
  47.       Left            =   1140
  48.       PasswordChar    =   "*"
  49.       TabIndex        =   1
  50.       Top             =   1200
  51.       Width           =   2175
  52.    End
  53.    Begin VB.Label Label1 
  54.       Caption         =   "The Database is password protected, this program requires  a correct password to continue."
  55.       Height          =   735
  56.       Left            =   660
  57.       TabIndex        =   4
  58.       Top             =   180
  59.       Width           =   2715
  60.    End
  61.    Begin VB.Image Image1 
  62.       Height          =   480
  63.       Left            =   120
  64.       Picture         =   "frmLogin.frx":014A
  65.       Top             =   120
  66.       Width           =   480
  67.    End
  68.    Begin VB.Label lblLabels 
  69.       Caption         =   "&Password:"
  70.       Height          =   210
  71.       Index           =   1
  72.       Left            =   165
  73.       TabIndex        =   0
  74.       Top             =   1260
  75.       Width           =   840
  76.    End
  77. End
  78. Attribute VB_Name = "frmLogin"
  79. Attribute VB_GlobalNameSpace = False
  80. Attribute VB_Creatable = False
  81. Attribute VB_PredeclaredId = True
  82. Attribute VB_Exposed = False
  83. Option Explicit
  84.  
  85. Private sPassword As String
  86. Private bCancel   As Boolean
  87.  
  88. Public Property Let Password(sPass As String)
  89.  
  90.     sPassword = sPass
  91.  
  92. End Property
  93.  
  94. Public Property Get Password() As String
  95.  
  96.     Password = sPassword
  97.  
  98. End Property
  99.  
  100. Public Property Let NoMore(bCan As Boolean)
  101.  
  102.     bCancel = bCan
  103.  
  104. End Property
  105.  
  106. Public Property Get NoMore() As Boolean
  107.  
  108.     NoMore = bCancel
  109.  
  110. End Property
  111.  
  112. Private Sub cmdCancel_Click()
  113.  
  114.     Me.NoMore = True
  115.     sPassword = vbNullString
  116.     Me.Hide
  117.  
  118. End Sub
  119.  
  120. Private Sub cmdOK_Click()
  121.  
  122.     If Len(txtPassword.Text) = 0 Then
  123.         txtPassword.SetFocus
  124.     Else
  125.         Me.Password = txtPassword.Text
  126.         Me.Hide
  127.     End If
  128.  
  129. End Sub
  130.  
  131. Private Sub Form_Activate()
  132.  
  133.     txtPassword.SetFocus
  134.     txtPassword.Text = vbNullString
  135.     bCancel = False
  136.     sPassword = vbNullString
  137.  
  138. End Sub
  139.  
  140.  
  141.