home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD3791342000.psc / frmOptions.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-01-06  |  3.2 KB  |  105 lines

  1. VERSION 5.00
  2. Begin VB.Form frmOptions 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Options"
  5.    ClientHeight    =   1890
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4575
  9.    LinkTopic       =   "Form1"
  10.    MaxButton       =   0   'False
  11.    MinButton       =   0   'False
  12.    ScaleHeight     =   1890
  13.    ScaleWidth      =   4575
  14.    ShowInTaskbar   =   0   'False
  15.    StartUpPosition =   3  'Windows Default
  16.    Begin VB.CommandButton cmdApply 
  17.       Caption         =   "&Apply"
  18.       Height          =   375
  19.       Left            =   3000
  20.       TabIndex        =   5
  21.       Top             =   1440
  22.       Width           =   1455
  23.    End
  24.    Begin VB.CommandButton cmdCancel 
  25.       Caption         =   "&Cancel"
  26.       Height          =   375
  27.       Left            =   1560
  28.       TabIndex        =   4
  29.       Top             =   1440
  30.       Width           =   1455
  31.    End
  32.    Begin VB.CommandButton cmdOK 
  33.       Caption         =   "&OK"
  34.       Height          =   375
  35.       Left            =   120
  36.       TabIndex        =   3
  37.       Top             =   1440
  38.       Width           =   1455
  39.    End
  40.    Begin VB.Frame framAS 
  41.       Caption         =   "Auto-save"
  42.       Height          =   1215
  43.       Left            =   120
  44.       TabIndex        =   0
  45.       Top             =   120
  46.       Width           =   4335
  47.       Begin VB.CheckBox chkEnMSG 
  48.          Caption         =   "Enable message on startup when document has been saved by Auto-save"
  49.          Height          =   375
  50.          Left            =   120
  51.          TabIndex        =   2
  52.          Top             =   720
  53.          Value           =   1  'Checked
  54.          Width           =   4095
  55.       End
  56.       Begin VB.CheckBox chkEnAS 
  57.          Caption         =   "Enable the auto-save each 60sec."
  58.          Height          =   255
  59.          Left            =   120
  60.          TabIndex        =   1
  61.          Top             =   360
  62.          Value           =   1  'Checked
  63.          Width           =   2775
  64.       End
  65.    End
  66. Attribute VB_Name = "frmOptions"
  67. Attribute VB_GlobalNameSpace = False
  68. Attribute VB_Creatable = False
  69. Attribute VB_PredeclaredId = True
  70. Attribute VB_Exposed = False
  71. Option Explicit
  72. Dim EnAS As Boolean
  73. Dim EnMSG As Boolean
  74. Dim StateAS As Boolean
  75. Dim StateMSG As Boolean
  76. Private Sub cmdApply_Click()
  77.     If chkEnAS.Value = 1 Then EnAS = True
  78.     If chkEnAS.Value = 0 Then EnAS = False
  79.     'If chkEnAS.Value = 0 Then chkEnMSG.Value = 3
  80.     'If chkEnAS.Value = 1 Then chkEnMSG.Value = 0
  81.     If chkEnMSG.Value = 1 Then EnMSG = True
  82.     If chkEnMSG.Value = 0 Then EnMSG = False
  83.     Open "c:\windows\TWconfig.dll" For Output As #4
  84.         Print #4, EnAS
  85.         Print #4, EnMSG
  86.     Close #4
  87. End Sub
  88. Private Sub cmdCancel_Click()
  89.     Unload Me
  90. End Sub
  91. Private Sub cmdOK_Click()
  92.     cmdApply_Click
  93.     Unload Me
  94. End Sub
  95. Private Sub Form_Load()
  96.     Open "c:\windows\TWconfig.dll" For Input As #6
  97.         Input #6, StateAS
  98.         Input #6, StateMSG
  99.     Close #6
  100.     If StateAS = True Then chkEnAS.Value = 1
  101.     If StateAS = False Then chkEnAS.Value = 0
  102.     If StateMSG = True Then chkEnMSG.Value = 1
  103.     If StateMSG = False Then chkEnMSG.Value = 0
  104. End Sub
  105.