home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
- Begin VB.Form Menu
- BorderStyle = 1 'Fixed Single
- Caption = "Options"
- ClientHeight = 3390
- ClientLeft = 0
- ClientTop = -60
- ClientWidth = 4680
- Icon = "Menu.frx":0000
- LinkTopic = "Form2"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- Moveable = 0 'False
- ScaleHeight = 3390
- ScaleWidth = 4680
- ShowInTaskbar = 0 'False
- Begin VB.CheckBox Check3
- Caption = "Screen Saver &Mode"
- Height = 255
- Left = 240
- TabIndex = 12
- Top = 3840
- Width = 2535
- End
- Begin VB.CommandButton Command4
- Caption = "&Cancel"
- Height = 495
- Left = 2400
- TabIndex = 14
- Top = 4200
- Width = 2055
- End
- Begin VB.CommandButton Command3
- Caption = "Save &Options"
- Height = 495
- Left = 240
- TabIndex = 13
- Top = 4200
- Width = 2055
- End
- Begin VB.CommandButton Command2
- Caption = "Change &PassWord"
- Height = 315
- Left = 2040
- TabIndex = 11
- Top = 3480
- Width = 2415
- End
- Begin VB.CheckBox Check2
- Caption = "&Require PassWord"
- Height = 255
- Left = 240
- TabIndex = 10
- Top = 3480
- Width = 1815
- End
- Begin VB.CheckBox Check1
- Caption = "&Delete Trails"
- Height = 255
- Left = 240
- TabIndex = 2
- Top = 960
- Width = 1455
- End
- Begin VB.CommandButton Command1
- Caption = "C&lear Screen"
- Height = 315
- Left = 3000
- TabIndex = 9
- Top = 3000
- Width = 1455
- End
- Begin VB.ComboBox Combo1
- Height = 315
- ItemData = "Menu.frx":0442
- Left = 1440
- List = "Menu.frx":0455
- Style = 2 'Dropdown List
- TabIndex = 8
- Top = 3000
- Width = 1455
- End
- Begin ComctlLib.Slider Slider1
- Height = 495
- Left = 120
- TabIndex = 1
- Top = 360
- Width = 4335
- _ExtentX = 7646
- _ExtentY = 873
- _Version = 327682
- LargeChange = 1
- Min = 1
- SelStart = 1
- Value = 1
- End
- Begin ComctlLib.Slider Slider2
- Height = 495
- Left = 120
- TabIndex = 4
- Top = 1560
- Width = 4335
- _ExtentX = 7646
- _ExtentY = 873
- _Version = 327682
- LargeChange = 1
- Max = 50
- End
- Begin ComctlLib.Slider Slider3
- Height = 495
- Left = 120
- TabIndex = 6
- Top = 2400
- Width = 4335
- _ExtentX = 7646
- _ExtentY = 873
- _Version = 327682
- LargeChange = 1
- Min = 2
- Max = 4
- SelStart = 2
- Value = 2
- End
- Begin VB.Label Label4
- Caption = "&Number of Sides:"
- Height = 255
- Left = 240
- TabIndex = 5
- Top = 2160
- Width = 2295
- End
- Begin VB.Label Label3
- Caption = "&Trail Size"
- Height = 255
- Left = 240
- TabIndex = 3
- Top = 1320
- Width = 2295
- End
- Begin VB.Label Label2
- Caption = "Line &Style:"
- Height = 255
- Left = 240
- TabIndex = 7
- Top = 3045
- Width = 1215
- End
- Begin VB.Label Label1
- Caption = "Line &Width:"
- Height = 255
- Left = 240
- TabIndex = 0
- Top = 120
- Width = 2295
- End
- Begin VB.Menu mnuFile
- Caption = "File"
- Visible = 0 'False
- Begin VB.Menu mnuOptions
- Caption = "&Options"
- End
- Begin VB.Menu SP1
- Caption = "-"
- End
- Begin VB.Menu mnuAbout
- Caption = "&About"
- End
- Begin VB.Menu SP2
- Caption = "-"
- End
- Begin VB.Menu mnuExit
- Caption = "&Exit"
- End
- End
- Attribute VB_Name = "Menu"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Compare Text
- Private Sub mnuAbout_Click()
- 'Generate a standard About Message Box
- MsgBox "Programmed by Pedro Lamas" & vbCrLf & "Copyright
- 1997-1999 Underground Software", vbApplicationModal + vbInformation, "Credits!"
- 'Enable the Drawing Timer
- BlackBoard.Timer1.Enabled = True
- End Sub
- Private Sub Check1_Click()
- 'If the "Delete Trails" option is checked
- If Check1.Value = 1 Then
- 'Enable the "Trails Size" Slider and the corresponding
- 'Label
- Slider2.Enabled = True
- Label3.Enabled = True
- 'Update the "Delete Lines" variable
- DelLines = True
- Else
- 'Disable the "Trails Size" Slider and the corresponding
- 'Label
- Slider2.Enabled = False
- Label3.Enabled = False
- 'Update the "Delete Lines" variable
- DelLines = False
- End If
- 'Redraw the Mistify
- BlackBoard.Calc (2)
- End Sub
- Private Sub Check2_Click()
- 'Update the "Require Password" variable
- P = -Check2.Value
- End Sub
- Private Sub Check3_Click()
- 'Update the "Screen Saver Mode Variable" variable
- SS = -Check3.Value
- End Sub
- Private Sub Combo1_Click()
- 'Update the "Line Style" variable
- DrawStyle = Combo1.ListIndex
- 'Clear the screen
- BlackBoard.Cls
- End Sub
- Private Sub Command1_Click()
- 'Clear the screen
- BlackBoard.Cls
- End Sub
- Private Sub Command2_Click()
- 'Local variable declaration
- Dim S As String, SC As String
- 'If there is a already a password
- If PSWD <> "" Then
- 'Ask for the current password
- S = InputBox("Please enter the CURRENT PassWord:", "Change PassWord", "")
- 'Check if Cancel was pressed. If so, exit the Sub
- If S = "" Then Exit Sub
- 'Check if the password is correct
- If S <> PSWD Then
- 'Generate a Message Box, indicating an incorrect password
- 'and exit this Sub
- MsgBox "Incorrect Password!", vbApplicationModal + vbCritical, "Change PassWord"
- Exit Sub
- End If
- End If
- aqui:
- 'Ask for the new password
- S = InputBox("Please enter the NEW PassWord:", "Change PassWord", "")
- 'Check if Cancel was pressed. If so, exit the Sub
- If S = "" Then Exit Sub
- 'Ask for password confirmation
- SC = InputBox("Please re-enter the NEW PassWord:", "Change PassWord", "")
- 'Check if Cancel was pressed. If so, exit the Sub
- If SC = "" Then Exit Sub
- 'Confirm the entered passwords
- If S <> SC Then
- 'If the passwords are different, generate an Error
- 'Message Box and go back to ask for the new password
- MsgBox "PassWord not Checked!", vbApplicationModal + vbCritical, "Change PassWord"
- GoTo aqui
- End If
- 'Update the "Password" variable
- PSWD = S
- End Sub
- Private Sub Command3_Click()
- 'OK was pressed. Save all options to the registry
- SaveSetting "GraphicsSaver", "Op
- es", "RST", RST
- SaveSetting "GraphicsSaver", "Op
- es", "DelLines", DelLines
- SaveSetting "GraphicsSaver", "Op
- es", "Pts", Pts
- SaveSetting "GraphicsSaver", "Op
- es", "DrawWidth", DrawWidth
- SaveSetting "GraphicsSaver", "Op
- es", "DrawStyle", DrawStyle
- SaveSetting "GraphicsSaver", "Op
- es", "PSWD", PSWD
- SaveSetting "GraphicsSaver", "Op
- es", "P", P
- SaveSetting "GraphicsSaver", "Op
- es", "SS", SS
- 'End the program
- End
- End Sub
- Private Sub Command4_Click()
- 'Cancel was pressed. End the program
- End
- End Sub
- Private Sub Form_Load()
- On Error Resume Next
- 'Check if the program started in Windows Screen Saver
- 'Mode
- If IsNumeric(Right(Command, 1)) = True Then
- 'If so, unload the Menu and exit this Sub
- Unload Menu
- Exit Sub
- End If
- 'Get the saved settings
- RST = GetSetting("GraphicsSaver", "Op
- es", "RST")
- DelLines = GetSetting("GraphicsSaver", "Op
- es", "DelLines")
- Pts = GetSetting("GraphicsSaver", "Op
- es", "Pts")
- DrawWidth = GetSetting("GraphicsSaver", "Op
- es", "DrawWidth")
- DrawStyle = GetSetting("GraphicsSaver", "Op
- es", "DrawStyle")
- PSWD = GetSetting("GraphicsSaver", "Op
- es", "PSWD")
- P = GetSetting("GraphicsSaver", "Op
- es", "P")
- SS = GetSetting("GraphicsSaver", "Op
- es", "SS")
- 'Update the Menu control values
- Slider1.Value = DrawWidth
- Combo1.ListIndex = DrawStyle
- Check1.Value = -DelLines
- Slider2.Value = RST
- Slider3.Value = Pts
- Check2.Value = -P
- Check3.Value = -SS
- Check1_Click
- 'Check if the program started in Windows Screen Saver
- 'Mode
- If Not Command Like "*/S*" Then
- 'If so, hide some Menu options and exit this Sub
- Command1.Visible = False
- Me.Height = 5190
- Me.Show
- Exit Sub
- End If
- 'Hide the Menu
- Hide
- 'If the "Screen Saver Mode" variable is True then hide
- 'the cursor
- If SS = True Then ShowCursor 0
- 'Show the main Screen and start drawing
- BlackBoard.Show
- BlackBoard.Calc (1)
- BlackBoard.Timer1.Enabled = True
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- 'Show the cursor on program end
- ShowCursor 1
- End Sub
- Private Sub mnuOptions_Click()
- 'Option swas selected. Show the options and restart
- 'drawing
- Menu.Show
- BlackBoard.Timer1.Enabled = True
- End Sub
- Private Sub mnuExit_Click()
- 'Local variable declare
- Dim S As String
- 'Check if "Require Password" variable is true and there
- 'is a valid password
- If PSWD <> "" And P = True Then
- aqui:
- 'Ask the current password
- S = InputBox("Please enter the PassWord", "Exit!", "")
- 'Check if Cancel was pressed
- If S = "" Then
- 'If so continue drawing and exit this Sub
- BlackBoard.Timer1.Enabled = True
- Exit Sub
- 'Else, check if the password is correct
- ElseIf S <> PSWD Then
- 'If it isn't generate an Error Message Box and go back to
- 'ask again the password
- MsgBox "Incorrect PassWord!", vbApplicationModal + vbCritical, "Exit!"
- GoTo aqui
- End If
- End If
- 'End the program
- End
- End Sub
- Private Sub Slider1_Change()
- 'Update the "Line Width" variable
- DrawWidth = Slider1.Value
- 'Clear the screen
- BlackBoard.Cls
- End Sub
- Private Sub Slider2_Change()
- 'Update the "Trail Size" variable
- RST = Slider2.Value
- 'Reset the leading trails to 0 and restart the drawing
- A = 0
- BlackBoard.Calc (2)
- End Sub
- Private Sub Slider3_Change()
- 'Update the "Number of Sides" variable
- Pts = Slider3.Value
- 'Clear the screen
- BlackBoard.Cls
- End Sub
-