home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / pswdprot / configur.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-07  |  5.4 KB  |  190 lines

  1. VERSION 2.00
  2. Begin Form Configure 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Configure"
  5.    ClientHeight    =   4065
  6.    ClientLeft      =   4245
  7.    ClientTop       =   3375
  8.    ClientWidth     =   3705
  9.    Height          =   4470
  10.    Left            =   4185
  11.    LinkTopic       =   "Form1"
  12.    ScaleHeight     =   4065
  13.    ScaleWidth      =   3705
  14.    Top             =   3030
  15.    Width           =   3825
  16.    Begin SSPanel Panel3D6 
  17.       BackColor       =   &H00C0C0C0&
  18.       BevelOuter      =   1  'Inset
  19.       Caption         =   "Time Interval"
  20.       Font3D          =   0  'None
  21.       Height          =   252
  22.       Left            =   480
  23.       TabIndex        =   11
  24.       Top             =   480
  25.       Width           =   1452
  26.    End
  27.    Begin TextBox Time_set 
  28.       BackColor       =   &H00C0C0C0&
  29.       Height          =   288
  30.       Left            =   2040
  31.       TabIndex        =   10
  32.       Top             =   480
  33.       Width           =   612
  34.    End
  35.    Begin SpinButton Spin1 
  36.       Height          =   252
  37.       Left            =   2640
  38.       Top             =   480
  39.       Width           =   372
  40.    End
  41.    Begin SSPanel Panel3D5 
  42.       BackColor       =   &H00C0C0C0&
  43.       BevelOuter      =   1  'Inset
  44.       Font3D          =   0  'None
  45.       Height          =   492
  46.       Left            =   360
  47.       TabIndex        =   9
  48.       Top             =   360
  49.       Width           =   2892
  50.    End
  51.    Begin SSCommand Command3D5 
  52.       Caption         =   "Set Password..."
  53.       Enabled         =   0   'False
  54.       Font3D          =   0  'None
  55.       Height          =   372
  56.       Left            =   720
  57.       TabIndex        =   8
  58.       Top             =   1560
  59.       Width           =   2172
  60.    End
  61.    Begin SSCheck Check3D1 
  62.       Caption         =   "Password Protected"
  63.       Font3D          =   0  'None
  64.       Height          =   252
  65.       Left            =   840
  66.       TabIndex        =   7
  67.       Top             =   1200
  68.       Width           =   1932
  69.    End
  70.    Begin SSCommand Command3D4 
  71.       Caption         =   "About..."
  72.       Font3D          =   0  'None
  73.       Height          =   492
  74.       Left            =   1920
  75.       TabIndex        =   6
  76.       Top             =   3000
  77.       Width           =   972
  78.    End
  79.    Begin SSCommand Command3D3 
  80.       Caption         =   "Help..."
  81.       Font3D          =   0  'None
  82.       Height          =   492
  83.       Left            =   720
  84.       TabIndex        =   5
  85.       Top             =   3000
  86.       Width           =   972
  87.    End
  88.    Begin SSCommand Command3D2 
  89.       Caption         =   "Cancel"
  90.       Font3D          =   0  'None
  91.       Height          =   492
  92.       Left            =   1920
  93.       TabIndex        =   4
  94.       Top             =   2400
  95.       Width           =   972
  96.    End
  97.    Begin SSCommand Command3D1 
  98.       Caption         =   "OK"
  99.       Font3D          =   0  'None
  100.       Height          =   492
  101.       Left            =   720
  102.       TabIndex        =   3
  103.       Top             =   2400
  104.       Width           =   972
  105.    End
  106.    Begin SSPanel Panel3D3 
  107.       BackColor       =   &H00C0C0C0&
  108.       BevelOuter      =   1  'Inset
  109.       Font3D          =   0  'None
  110.       Height          =   1332
  111.       Left            =   360
  112.       TabIndex        =   2
  113.       Top             =   2280
  114.       Width           =   2892
  115.    End
  116.    Begin SSPanel Panel3D2 
  117.       BackColor       =   &H00C0C0C0&
  118.       BevelOuter      =   1  'Inset
  119.       Font3D          =   0  'None
  120.       Height          =   972
  121.       Left            =   360
  122.       TabIndex        =   1
  123.       Top             =   1080
  124.       Width           =   2892
  125.    End
  126.    Begin SSFrame Frame3D1 
  127.       Font3D          =   0  'None
  128.       Height          =   3735
  129.       Left            =   120
  130.       TabIndex        =   0
  131.       Top             =   120
  132.       Width           =   3375
  133.    End
  134. Sub Check3D1_Click (Value As Integer)
  135. If (Value = -1) Then
  136.     command3d5.Enabled = True
  137.     command3d5.Enabled = False
  138. End If
  139. End Sub
  140. Sub Command3D1_Click ()
  141. If (Val(time_set.Text) < 1) Then
  142.    time_set.Text = "1"
  143. End If
  144. A$ = "N"
  145. If (CHECK3D1.Value = True) Then
  146.     A$ = "Y"
  147. End If
  148. 'Write the directory of the Bit Maps
  149. RESULT% = WritePrivateProfileString("PWSAMPLE", "PWProtected", A$, "CONTROL.INI")
  150. RESULT% = WritePrivateProfileString("PWSAMPLE", "Timer Set", time_set.Text, "CONTROL.INI")
  151. End Sub
  152. Sub Command3D2_Click ()
  153. End Sub
  154. Sub Command3D3_Click ()
  155. 'HelpFilePath = "D:\PROGRAM\VB\PROJECTS\SCRNSVR\GIFSVR\SCRNSVR.HLP"
  156. 'R = WinHelp(Configure.hWnd, HelpFilePath, HELP_CONTENTS, 0)
  157. End Sub
  158. Sub Command3D4_Click ()
  159. aboutbox.Show
  160. End Sub
  161. Sub Command3D5_Click ()
  162. ChngPswdInst = Shell("C:\WINDOWS\SYSTEM\CHGPSWD.EXE")
  163. End Sub
  164. Sub Form_Load ()
  165. A$ = Space$(50)
  166. RESULT% = GetPrivateProfileString("PWSAMPLE", "PWProtected", "N", A$, 50, "CONTROL.INI")
  167. If (Mid$(A$, 1, 1) = "Y") Then
  168.     CHECK3D1.Value = True
  169. End If
  170. If (CHECK3D1.Value = True) Then
  171.     command3d5.Enabled = True
  172.     command3d5.Enabled = False
  173. End If
  174. A$ = Space$(3)
  175. RESULT% = GetPrivateProfileString("PWSAMPLE", "Timer Set", " ", A$, 3, "CONTROL.INI")
  176. time_set.Text = A$
  177. If (RESULT% = 0) Then
  178.    time_set.Text = "1"
  179. End If
  180. End Sub
  181. Sub Spin1_SpinDown ()
  182. time_set.Text = Str$(Val(time_set.Text) - 1)
  183. If (Val(time_set.Text) < 1) Then
  184.    time_set.Text = 1
  185. End If
  186. End Sub
  187. Sub Spin1_SpinUp ()
  188. time_set.Text = Str$(Val(time_set.Text) + 1)
  189. End Sub
  190.