home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form SetupForm
- BorderStyle = 3 'Fixed Double
- Caption = "Many Things"
- Height = 4140
- Left = 1116
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3720
- ScaleWidth = 4668
- Top = 552
- Width = 4764
- Begin TextBox txtMaxCums
- Height = 288
- Left = 3600
- TabIndex = 12
- Text = "1000"
- Top = 2760
- Width = 612
- End
- Begin TextBox txtChangeMin
- Height = 288
- Left = 3600
- TabIndex = 10
- Text = "5"
- Top = 2400
- Width = 612
- End
- Begin TextBox txtRepeatCount
- Height = 288
- Left = 3600
- TabIndex = 8
- Text = "10"
- Top = 2040
- Width = 612
- End
- Begin TextBox txtMaxLines
- Height = 288
- Left = 3600
- MaxLength = 3
- TabIndex = 0
- Text = "100"
- Top = 1680
- Width = 612
- End
- Begin CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "Cancel"
- Height = 372
- Left = 2520
- TabIndex = 5
- Top = 3240
- Width = 1092
- End
- Begin CommandButton cmdOK
- Caption = "OK"
- Default = -1 'True
- Height = 372
- Left = 1320
- TabIndex = 4
- Top = 3240
- Width = 1092
- End
- Begin Label Label7
- Caption = "Maximum number of lines for cumulatives:"
- Height = 252
- Left = 120
- TabIndex = 11
- Top = 2760
- Width = 3492
- End
- Begin Label Label6
- Caption = "Minutes before changing format:"
- Height = 252
- Left = 900
- TabIndex = 9
- Top = 2412
- Width = 2772
- End
- Begin Label Label5
- Caption = "Number of lines before changing colors:"
- Height = 252
- Left = 240
- TabIndex = 7
- Top = 2040
- Width = 3372
- End
- Begin Label Label4
- Alignment = 1 'Right Justify
- Caption = "Maximum number of lines:"
- Height = 252
- Left = 900
- TabIndex = 6
- Top = 1728
- Width = 2652
- End
- Begin Image Image1
- Height = 384
- Left = 120
- Picture = SETUP.FRX:0000
- Top = 120
- Width = 384
- End
- Begin Label Label3
- Alignment = 2 'Center
- Caption = "Based on an example in, ""Learn Programming and Visual Basic with John Socha"" (recommended)"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 552
- Left = 720
- TabIndex = 3
- Top = 396
- Width = 3408
- End
- Begin Label Label2
- Caption = "Multiple Screen Savers by Bruce McLean"
- Height = 252
- Left = 720
- TabIndex = 2
- Top = 120
- Width = 3972
- End
- Begin Label Label1
- Alignment = 2 'Center
- Caption = "This is a collection of screen savers that switch at regular intervals to add a bit of variety to the screen."
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 492
- Left = 360
- TabIndex = 1
- Top = 1080
- Width = 3852
- End
- Option Explicit
- Sub cmdCancel_Click ()
- End ' end program
- End Sub
- Sub cmdOK_Click ()
- Dim i As Integer
- ' store setup data in control.ini
- i = WritePrivateProfileString(secName, keyName, txtMaxLines, iniName)
- i = WritePrivateProfileString(secName, RepeatName, txtRepeatCount, iniName)
- i = WritePrivateProfileString(secName, ChangeMinutesName, txtChangeMin, iniName)
- i = WritePrivateProfileString(secName, MaxCumsName, txtMaxCums, iniName)
- End ' end program
- End Sub
- Sub Form_Load ()
- txtMaxLines = maxLines ' Set to current max lines
- txtRepeatCount = RepeatCount
- txtChangeMin = MaxChangeMinutes
- txtMaxCums = MaxCums
- txtMaxLines.SelLength = 3 ' Select the current value
- End Sub
- Sub txtMaxLines_KeyPress (KeyAscii As Integer)
- If KeyAscii < 32 Then
- ' ' Let Ctrl keys pass through
- ElseIf KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
- KeyAscii = 0 ' Discard chars other than digits
- End If
- End Sub
-