home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / S-Book_v4_206928652007.psc / frmKeyDirect.frm < prev    next >
Text File  |  2006-01-07  |  3KB  |  116 lines

  1. VERSION 5.00
  2. Begin VB.Form frmKeyDirect 
  3.    AutoRedraw      =   -1  'True
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   " Open S-Book"
  6.    ClientHeight    =   1830
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   4770
  10.    ControlBox      =   0   'False
  11.    LinkTopic       =   "Form1"
  12.    LockControls    =   -1  'True
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   1830
  16.    ScaleWidth      =   4770
  17.    ShowInTaskbar   =   0   'False
  18.    StartUpPosition =   1  'CenterOwner
  19.    Begin VB.CheckBox Check1 
  20.       Caption         =   "&Hide Typing"
  21.       Height          =   225
  22.       Left            =   210
  23.       TabIndex        =   1
  24.       Top             =   945
  25.       Width           =   3060
  26.    End
  27.    Begin VB.CommandButton cmdCancel 
  28.       Cancel          =   -1  'True
  29.       Caption         =   "&Cancel"
  30.       Height          =   375
  31.       Left            =   3360
  32.       TabIndex        =   3
  33.       Top             =   1260
  34.       Width           =   1170
  35.    End
  36.    Begin VB.CommandButton cmdOK 
  37.       Caption         =   "&OK"
  38.       Height          =   375
  39.       Left            =   2100
  40.       TabIndex        =   2
  41.       Top             =   1260
  42.       Width           =   1170
  43.    End
  44.    Begin VB.TextBox txtCode 
  45.       BackColor       =   &H00FFFFFF&
  46.       ForeColor       =   &H00000000&
  47.       Height          =   285
  48.       Left            =   210
  49.       TabIndex        =   0
  50.       Top             =   525
  51.       Width           =   4320
  52.    End
  53.    Begin VB.Label lblCode 
  54.       Caption         =   "Enter the Passphrase"
  55.       Height          =   225
  56.       Left            =   210
  57.       TabIndex        =   4
  58.       Top             =   315
  59.       Width           =   3795
  60.    End
  61. End
  62. Attribute VB_Name = "frmKeyDirect"
  63. Attribute VB_GlobalNameSpace = False
  64. Attribute VB_Creatable = False
  65. Attribute VB_PredeclaredId = True
  66. Attribute VB_Exposed = False
  67. Option Explicit
  68.  
  69. Private Sub Form_Activate()
  70. gblnCancelKey = False
  71. Me.txtCode.Text = ""
  72. Me.txtCode.PasswordChar = "*"
  73. Me.Check1.Value = 1
  74. Me.txtCode.SetFocus
  75. If gstrKeyInput <> "" Then
  76.     Me.txtCode.SelStart = 0
  77.     Me.txtCode.SelLength = Len(Me.txtCode.Text)
  78.     End If
  79. End Sub
  80.  
  81. Private Sub Check1_Click()
  82. If Me.Check1.Value = 1 Then
  83.     Me.txtCode.PasswordChar = "*"
  84.     Else
  85.     Me.txtCode.PasswordChar = ""
  86.     End If
  87. End Sub
  88.  
  89. Private Sub cmdOK_Click()
  90. If Me.txtCode.Text = "" Then Exit Sub
  91. gstrKeyInput = Me.txtCode.Text
  92. Me.Hide
  93. End Sub
  94.  
  95. Private Sub cmdCancel_Click()
  96. Me.txtCode.Text = ""
  97. gblnCancelKey = True
  98. Me.Hide
  99. End Sub
  100.  
  101. Private Sub txtCode_Change()
  102. If Len(Me.txtCode.Text) > 0 Then
  103.     Me.cmdOK.Enabled = True
  104.     Else
  105.     Me.cmdOK.Enabled = False
  106.     End If
  107. End Sub
  108.  
  109. Private Sub txtCode_KeyPress(KeyAscii As Integer)
  110. If KeyAscii = 13 Then
  111.     KeyAscii = 0
  112.     If Me.txtCode <> "" And Me.cmdOK.Enabled = True Then cmdOK_Click
  113.     End If
  114. End Sub
  115.  
  116.