home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form2
- BackColor = &H0000FFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "Resource Bar"
- ClientHeight = 3360
- ClientLeft = 3045
- ClientTop = 1245
- ClientWidth = 2655
- Height = 3765
- Left = 2985
- LinkMode = 1 'Source
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3360
- ScaleWidth = 2655
- Top = 900
- Width = 2775
- Begin SSPanel Panel3D1
- BackColor = &H00C0C0C0&
- BevelInner = 1 'Inset
- BevelOuter = 1 'Inset
- BevelWidth = 3
- BorderWidth = 4
- Font3D = 0 'None
- ForeColor = &H00000000&
- Height = 3375
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 2655
- Begin SSCommand OkButton
- BevelWidth = 5
- Caption = "Ok"
- Font3D = 2 'Raised w/heavy shading
- ForeColor = &H00000000&
- Height = 495
- Left = 1560
- TabIndex = 9
- Top = 2640
- Width = 735
- End
- Begin SSCommand HelpButton
- BevelWidth = 5
- Caption = "Help"
- Font3D = 2 'Raised w/heavy shading
- ForeColor = &H00000000&
- Height = 495
- Left = 360
- TabIndex = 1
- Top = 2640
- Width = 735
- End
- Begin SSFrame Frame3D2
- Caption = "Bottom Of The Hour"
- Font3D = 2 'Raised w/heavy shading
- ForeColor = &H00C00000&
- Height = 855
- Left = 240
- TabIndex = 6
- Top = 1680
- Width = 2175
- Begin SSOption Ding
- Caption = "None"
- Font3D = 4 'Inset w/heavy shading
- ForeColor = &H00000000&
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 8
- TabStop = 0 'False
- Top = 480
- Width = 1695
- End
- Begin SSOption Ding
- Caption = "Ding"
- Font3D = 4 'Inset w/heavy shading
- ForeColor = &H00000000&
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 7
- Top = 240
- Value = -1 'True
- Width = 1695
- End
- End
- Begin SSFrame Frame3D1
- Caption = "Top Of The Hour"
- Font3D = 2 'Raised w/heavy shading
- ForeColor = &H00C00000&
- Height = 1335
- Left = 240
- TabIndex = 2
- Top = 240
- Width = 2175
- Begin SSOption BigBen
- Caption = "None"
- Font3D = 4 'Inset w/heavy shading
- ForeColor = &H00000000&
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 5
- TabStop = 0 'False
- Top = 960
- Width = 1455
- End
- Begin SSOption BigBen
- Caption = "Ding"
- Font3D = 4 'Inset w/heavy shading
- ForeColor = &H00000000&
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 4
- TabStop = 0 'False
- Top = 600
- Width = 1455
- End
- Begin SSOption BigBen
- Caption = "Big Ben"
- Font3D = 4 'Inset w/heavy shading
- ForeColor = &H00000000&
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 3
- Top = 240
- Value = -1 'True
- Width = 1455
- End
- End
- End
- Sub BigBen_Click (Index As Integer, Value As Integer)
- If BigBen(0).Value = True Then NewTopOfHour$ = "BIGBEN"
- If BigBen(1).Value = True Then NewTopOfHour$ = "DING"
- If BigBen(2).Value = True Then NewTopOfHour$ = "NONE"
- End Sub
- Sub Command3D1_Click ()
- Unload Form2
- Call Help_Me
- End Sub
- Sub DING_Click (Index As Integer, Value As Integer)
- If DING(0).Value = True Then NewBottOfHour$ = "DING"
- If DING(1).Value = True Then NewBottOfHour$ = "NONE"
- End Sub
- Sub Form_Load ()
- 'Take away the ON TOP feature in case user has
- ' positioned "bar" in front of where the form will appear
- ' Then reinstate the ON TOP feature in the Form_Unload
- ' proceedure.
- NotOnTop% = SetWindowPos(Form1.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS)
- 'read .ini file in case user changed
- ' it manually
- 'Does user want BigBen,DING, or nothing at top of hour
- AppName$ = "RESOURCE BAR"
- KeyName$ = "TOPOFHOUR"
- DefltStr$ = "BIGBEN"
- Dim RetStr As String * 255
- RetStr$ = String$(255, 0)
- nSize% = 255
- FileName$ = "RESOURCE.INI"
- LngthOfRetStr% = GetPrivateProfileString(AppName$, KeyName$, DefltStr$, RetStr$, nSize%, FileName$)
- TopOfHour$ = UCase$(Left$(RetStr$, LngthOfRetStr%))
- 'Does user want DING or nothing at bottom of hour
- AppName$ = "RESOURCE BAR"
- KeyName$ = "BOTTOFHOUR"
- DefltStr$ = "DING"
- RetStr$ = String$(255, 0)
- nSize% = 255
- FileName$ = "RESOURCE.INI"
- LngthOfRetStr% = GetPrivateProfileString(AppName$, KeyName$, DefltStr$, RetStr$, nSize%, FileName$)
- BottOfHour$ = UCase$(Left$(RetStr$, LngthOfRetStr%))
- If TopOfHour$ = "BIGBEN" Then BigBen(0).Value = True
- If TopOfHour$ = "DING" Then BigBen(1).Value = True
- If TopOfHour$ = "NONE" Then BigBen(2).Value = True
- If BottOfHour$ = "DING" Then DING(0).Value = True
- If BottOfHour$ = "NONE" Then DING(1).Value = True
- End Sub
- Sub Form_Unload (Cancel As Integer)
- AppName$ = "RESOURCE BAR"
- KeyName$ = "BOTTOFHOUR"
- FileName$ = "RESOURCE.INI"
- If NewBottOfHour$ <> BottOfHour$ Then 'if Option changed, rewrite INI file
- BottOfHour$ = NewBottOfHour$
- NewVal$ = BottOfHour$
- ResultCode% = WritePrivateProfileString(AppName$, KeyName$, NewVal$, FileName$)
- If ResultCode% = 0 Then
- MsgBox "Error updating INI file!", 16, "ERROR!"
- End If
- End If
- 'now check top of the hour setting
- AppName$ = "RESOURCE BAR"
- KeyName$ = "TOPOFHOUR"
- FileName$ = "RESOURCE.INI"
- If NewTopOfHour$ <> TopOfHour$ Then 'if Option changed, rewrite INI file
- TopOfHour$ = NewTopOfHour$
- NewVal$ = TopOfHour$
- ResultCode% = WritePrivateProfileString(AppName$, KeyName$, NewVal$, FileName$)
- If ResultCode% = 0 Then
- MsgBox "Error updating INI file!", 16, "ERROR!"
- End If
- End If
- Unload Form2
- OnTop% = SetWindowPos(Form1.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
- End Sub
- Sub HelpButton_Click ()
- Unload Form2
- Call Help_Me
- End Sub
- Sub OkButton_Click ()
- Call Form_Unload(0)
- End Sub
-