home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Unleashed / Visual_Basic_4_Unleashed_SAMS_Publishing_1995.iso / source / chap37 / enhanss / frmsetup.frm (.txt) < prev    next >
Visual Basic Form  |  1995-09-28  |  2KB  |  86 lines

  1. VERSION 4.00
  2. Begin VB.Form frmSetup 
  3.    Caption         =   "Boxes Setup"
  4.    ClientHeight    =   1920
  5.    ClientLeft      =   4515
  6.    ClientTop       =   3435
  7.    ClientWidth     =   2850
  8.    Height          =   2325
  9.    Left            =   4455
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1920
  12.    ScaleWidth      =   2850
  13.    Top             =   3090
  14.    Width           =   2970
  15.    Begin VB.CommandButton cmdCancel 
  16.       Caption         =   "Cancel"
  17.       Height          =   375
  18.       Left            =   1440
  19.       TabIndex        =   4
  20.       Top             =   1320
  21.       Width           =   915
  22.    End
  23.    Begin VB.CommandButton cmdOK 
  24.       Caption         =   "OK"
  25.       Height          =   375
  26.       Left            =   480
  27.       TabIndex        =   3
  28.       Top             =   1320
  29.       Width           =   915
  30.    End
  31.    Begin VB.Frame Frame1 
  32.       Caption         =   "BeepBox"
  33.       Height          =   975
  34.       Left            =   480
  35.       TabIndex        =   0
  36.       Top             =   180
  37.       Width           =   1875
  38.       Begin VB.OptionButton optBeepBoxOff 
  39.          Caption         =   "Off"
  40.          Height          =   255
  41.          Left            =   180
  42.          TabIndex        =   2
  43.          Top             =   540
  44.          Width           =   975
  45.       End
  46.       Begin VB.OptionButton optBeepBoxOn 
  47.          Caption         =   "On"
  48.          Height          =   255
  49.          Left            =   180
  50.          TabIndex        =   1
  51.          Top             =   300
  52.          Value           =   -1  'True
  53.          Width           =   735
  54.       End
  55.    End
  56. Attribute VB_Name = "frmSetup"
  57. Attribute VB_Creatable = False
  58. Attribute VB_Exposed = False
  59. Private Sub Command1_Click()
  60. End Sub
  61. Private Sub cmdCancel_Click()
  62. Unload Me
  63. End Sub
  64. Private Sub cmdOK_Click()
  65. Dim i As Long
  66. Dim sValue As String
  67. If optBeepBoxOn.Value = True Then
  68.     sValue = "TRUE"
  69.     sValue = "FALSE"
  70. End If
  71. i = WritePrivateProfileString("Screen Saver.Boxes", "BeepBox", sValue, "CONTROL.INI")
  72. Unload Me
  73. End Sub
  74. Private Sub Form_Load()
  75. Dim sBeepBox As String
  76. Dim i As Long
  77. Dim iSize As Integer
  78. sBeepBox = "        " ' 8 spaces
  79. iSize = 8
  80. i = GetPrivateProfileString("Screen Saver.Boxes", "BeepBox", "TRUE", sBeepBox, iSize, "CONTROL.INI")
  81. If UCase(Left(sBeepBox, 4)) = "TRUE" Then
  82.     optBeepBoxOn.Value = True
  83.     optBeepBoxOff.Value = True
  84. End If
  85. End Sub
  86.