home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Multimédia la Compil' 2
/
Sybex_Multimedia_La_Compil_2.iso
/
cooltool
/
slider
/
slider.frm
next >
Wrap
Text File
|
1995-04-20
|
30KB
|
910 lines
VERSION 2.00
Begin Form FormSlider
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "Slider Properties Example"
ClientHeight = 4845
ClientLeft = 855
ClientTop = 1080
ClientWidth = 8520
Height = 5250
Left = 795
LinkTopic = "Form2"
MaxButton = 0 'False
ScaleHeight = 4845
ScaleWidth = 8520
Top = 735
Width = 8640
Begin Frame Frame10
BackColor = &H00C0C0C0&
Caption = "Bevel Inner"
Height = 855
Left = 6060
TabIndex = 31
Top = 60
Width = 2355
Begin OptionButton OptionBevelInner
BackColor = &H00C0C0C0&
Caption = "Lowered"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 3
Left = 1080
TabIndex = 35
Top = 510
Width = 885
End
Begin OptionButton OptionBevelInner
BackColor = &H00C0C0C0&
Caption = "Inset"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 2
Left = 120
TabIndex = 34
Top = 510
Width = 885
End
Begin OptionButton OptionBevelInner
BackColor = &H00C0C0C0&
Caption = "Raised"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 1
Left = 1080
TabIndex = 33
Top = 240
Width = 885
End
Begin OptionButton OptionBevelInner
BackColor = &H00C0C0C0&
Caption = "None"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 0
Left = 120
TabIndex = 32
Top = 240
Value = -1 'True
Width = 885
End
End
Begin Frame Frame5
BackColor = &H00C0C0C0&
Caption = "MIDI CoolTools Slider"
Height = 3870
Left = 2580
TabIndex = 24
Top = 60
Width = 3315
Begin VSlider VSlider1
BackColor = &H00C0C0C0&
BevelInner = 0 'None
BevelOuter = 0 'None
BevelWidth = 2
BorderWidth = 2
Gap = 3
Height = 3495
LargeChange = 10
Left = 120
LinkControl = ""
LinkProperty = ""
Max = 100
Min = 0
ThumbHeight = 120
ThumbStyle = 0 'Normal
ThumbWidth = 355
TickColor = &H00000000&
TickCount = 5
TickLength = 4
TickMarks = 0 'No Tick Marks
TickWidth = 1
Top = 270
TrackBevel = 0 'None
TrackWidth = 0
Value = 0
Width = 495
End
End
Begin CommonDialog CMDialog1
Left = 90
Top = 4920
End
Begin Frame Frame9
BackColor = &H00C0C0C0&
Caption = "Slider Width"
Height = 675
Left = 2580
TabIndex = 12
Top = 4080
Width = 3315
Begin HSlider HScrollSliderWidth
BackColor = &H00C0C0C0&
BevelInner = 0 'None
BevelOuter = 0 'None
BevelWidth = 2
BorderWidth = 2
Gap = 3
Height = 285
LargeChange = 10
Left = 120
LinkControl = ""
LinkProperty = ""
Max = 2900
Min = 200
ThumbHeight = 250
ThumbStyle = 2 'Pointed Down
ThumbWidth = 200
TickColor = &H00000000&
TickCount = 10
TickLength = 4
TickMarks = 2 'Bottom
TickWidth = 1
Top = 300
TrackBevel = 1 'Raised
TrackWidth = 3
Value = 495
Width = 3135
End
End
Begin Frame FrameBevelWidth
BackColor = &H00C0C0C0&
Caption = "Bevel Width"
Height = 675
Left = 6060
TabIndex = 11
Top = 1860
Width = 2355
Begin HSlider HScrollBevelWidth
BackColor = &H00C0C0C0&
BevelInner = 0 'None
BevelOuter = 0 'None
BevelWidth = 2
BorderWidth = 2
Gap = 3
Height = 285
LargeChange = 10
Left = 120
LinkControl = ""
LinkProperty = ""
Max = 10
Min = 0
ThumbHeight = 250
ThumbStyle = 2 'Pointed Down
ThumbWidth = 200
TickColor = &H00000000&
TickCount = 3
TickLength = 4
TickMarks = 2 'Bottom
TickWidth = 1
Top = 270
TrackBevel = 1 'Raised
TrackWidth = 3
Value = 2
Width = 2145
End
End
Begin Frame Frame7
BackColor = &H00C0C0C0&
Caption = "Color"
Height = 1095
Left = 60
TabIndex = 10
Top = 1650
Width = 2355
Begin CommandButton CmdBackColor
Caption = "Background Color"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 150
TabIndex = 18
Top = 300
Width = 2115
End
Begin CommandButton CmdForeColor
Caption = "Foreground Color"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 150
TabIndex = 17
Top = 660
Width = 2115
End
End
Begin Frame Frame6
BackColor = &H00C0C0C0&
Caption = "Tick Marks"
Height = 1935
Left = 60
TabIndex = 9
Top = 2820
Width = 2355
Begin OptionButton OptionTickMark
BackColor = &H00C0C0C0&
Caption = "Right"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 2
Left = 120
TabIndex = 0
Top = 510
Width = 885
End
Begin OptionButton OptionTickMark
BackColor = &H00C0C0C0&
Caption = "Both"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 3
Left = 1050
TabIndex = 1
Top = 510
Width = 1275
End
Begin OptionButton OptionTickMark
BackColor = &H00C0C0C0&
Caption = "Left"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 1
Left = 1050
TabIndex = 2
Top = 270
Width = 1185
End
Begin OptionButton OptionTickMark
BackColor = &H00C0C0C0&
Caption = "None"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 0
Left = 120
TabIndex = 3
Top = 270
Value = -1 'True
Width = 885
End
Begin HScrollBar HScrollTickCount
Enabled = 0 'False
Height = 255
LargeChange = 5
Left = 660
Max = 25
TabIndex = 21
Top = 870
Value = 5
Width = 1575
End
Begin HScrollBar HScrollTickWidth
Enabled = 0 'False
Height = 255
LargeChange = 5
Left = 660
Max = 20
Min = 1
TabIndex = 20
Top = 1170
Value = 1
Width = 1575
End
Begin CommandButton CmdTickColor
Caption = "Tick Color"
Enabled = 0 'False
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 120
TabIndex = 19
Top = 1470
Width = 2115
End
Begin Label Label3
BackColor = &H00C0C0C0&
Caption = "Count"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 120
TabIndex = 23
Top = 870
Width = 495
End
Begin Label Label4
BackColor = &H00C0C0C0&
Caption = "Width"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 120
TabIndex = 22
Top = 1170
Width = 495
End
End
Begin Frame FrameBorderWidth
BackColor = &H00C0C0C0&
Caption = "Border Width"
Height = 675
Left = 6060
TabIndex = 8
Top = 2610
Width = 2355
Begin HSlider HScrollBorderWidth
BackColor = &H00C0C0C0&
BevelInner = 0 'None
BevelOuter = 0 'None
BevelWidth = 2
BorderWidth = 2
Gap = 3
Height = 285
LargeChange = 10
Left = 120
LinkControl = ""
LinkProperty = ""
Max = 10
Min = 0
ThumbHeight = 250
ThumbStyle = 2 'Pointed Down
ThumbWidth = 200
TickColor = &H00000000&
TickCount = 3
TickLength = 4
TickMarks = 2 'Bottom
TickWidth = 1
Top = 270
TrackBevel = 1 'Raised
TrackWidth = 3
Value = 2
Width = 2145
End
End
Begin Frame Frame3
BackColor = &H00C0C0C0&
Caption = "Track Bevel"
Height = 1335
Left = 6060
TabIndex = 7
Top = 3420
Width = 2355
Begin OptionButton OptionTrackBevel
BackColor = &H00C0C0C0&
Caption = "Lowered"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 3
Left = 1110
TabIndex = 39
Top = 570
Width = 885
End
Begin OptionButton OptionTrackBevel
BackColor = &H00C0C0C0&
Caption = "Inset"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 2
Left = 150
TabIndex = 38
Top = 570
Width = 885
End
Begin OptionButton OptionTrackBevel
BackColor = &H00C0C0C0&
Caption = "Raised"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 1
Left = 1110
TabIndex = 37
Top = 300
Width = 885
End
Begin OptionButton OptionTrackBevel
BackColor = &H00C0C0C0&
Caption = "None"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 0
Left = 150
TabIndex = 36
Top = 300
Value = -1 'True
Width = 885
End
Begin HScrollBar HScrollTrackWidth
Enabled = 0 'False
Height = 255
LargeChange = 5
Left = 660
Max = 10
TabIndex = 25
Top = 870
Value = 2
Width = 1515
End
Begin Label Label5
BackColor = &H00C0C0C0&
Caption = "Width"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 120
TabIndex = 26
Top = 870
Width = 495
End
End
Begin Frame Frame2
BackColor = &H00C0C0C0&
Caption = "Bevel Outer"
Height = 855
Left = 6060
TabIndex = 6
Top = 960
Width = 2355
Begin OptionButton OptionBevelOuter
BackColor = &H00C0C0C0&
Caption = "Lowered"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 3
Left = 1050
TabIndex = 30
Top = 540
Width = 885
End
Begin OptionButton OptionBevelOuter
BackColor = &H00C0C0C0&
Caption = "Inset"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 2
Left = 120
TabIndex = 29
Top = 540
Width = 885
End
Begin OptionButton OptionBevelOuter
BackColor = &H00C0C0C0&
Caption = "Raised"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 1
Left = 1050
TabIndex = 28
Top = 270
Width = 885
End
Begin OptionButton OptionBevelOuter
BackColor = &H00C0C0C0&
Caption = "None"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 0
Left = 120
TabIndex = 27
Top = 270
Value = -1 'True
Width = 885
End
End
Begin Frame Frame1
BackColor = &H00C0C0C0&
Caption = "Thumb Style"
Height = 1515
Left = 60
TabIndex = 5
Top = 90
Width = 2355
Begin OptionButton OptionThumbStyle
BackColor = &H00C0C0C0&
Caption = "Lined"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 3
Left = 90
TabIndex = 4
Top = 510
Width = 885
End
Begin OptionButton OptionThumbStyle
BackColor = &H00C0C0C0&
Caption = "Pointed Right"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 2
Left = 1020
TabIndex = 42
Top = 510
Width = 1275
End
Begin OptionButton OptionThumbStyle
BackColor = &H00C0C0C0&
Caption = "Pointed Left"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 1
Left = 1020
TabIndex = 41
Top = 270
Width = 1185
End
Begin OptionButton OptionThumbStyle
BackColor = &H00C0C0C0&
Caption = "Normal"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Index = 0
Left = 90
TabIndex = 40
Top = 270
Value = -1 'True
Width = 885
End
Begin HScrollBar HScrollThumbWidth
Height = 255
LargeChange = 5
Left = 660
Max = 2500
TabIndex = 14
Top = 1140
Value = 360
Width = 1575
End
Begin HScrollBar HScrollThumbHeight
Height = 255
LargeChange = 5
Left = 660
Max = 2000
TabIndex = 13
Top = 840
Value = 120
Width = 1575
End
Begin Label Label1
BackColor = &H00C0C0C0&
Caption = "Width"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 120
TabIndex = 16
Top = 1140
Width = 495
End
Begin Label Label2
BackColor = &H00C0C0C0&
Caption = "Height"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 120
TabIndex = 15
Top = 840
Width = 495
End
End
End
Const DLG_COLOR = 3
'
'Color Dialog Flags
'
Const CC_RGBINIT = &H1&
Const CC_FULLOPEN = &H2&
Const CC_PREVENTFULLOPEN = &H4&
Const CC_SHOWHELP = &H8&
Sub CmdBackColor_Click ()
'
' Load the control with the VSlider BackColor
'
CMDialog1.Color = Vslider1.BackColor
'
' Execute the color select dialog
'
CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
CMDialog1.Action = DLG_COLOR
'
' Assign the selected color to VSlider Backcolor properties
'
Vslider1.BackColor = CMDialog1.Color
End Sub
Sub CmdForeColor_Click ()
'
' Load the control with the VSlider ForeColor
'
CMDialog1.Color = Vslider1.ForeColor
'
' Execute the color select dialog
'
CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
CMDialog1.Action = DLG_COLOR
'
' Assign the selected color to VSlider Forecolor properties
'
Vslider1.ForeColor = CMDialog1.Color
End Sub
Sub CmdTickColor_Click ()
'
' Load the control with the VSlider TickColor
'
CMDialog1.Color = Vslider1.TickColor
'
' Execute the color select dialog
'
CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
CMDialog1.Action = DLG_COLOR
'
' Assign the selected color to VSlider Tickcolor properties
'
Vslider1.TickColor = CMDialog1.Color
End Sub
Sub Form_Load ()
' Center the form on the screen
Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
End Sub
Sub HScrollBevelWidth_Change ()
Vslider1.BevelWidth = HScrollBevelWidth.Value
End Sub
Sub HScrollBevelWidth_Scroll ()
Vslider1.BevelWidth = HScrollBevelWidth.Value
End Sub
Sub HScrollBorderWidth_Change ()
Vslider1.BorderWidth = HScrollBorderWidth.Value
End Sub
Sub HScrollBorderWidth_Scroll ()
Vslider1.BorderWidth = HScrollBorderWidth.Value
End Sub
Sub HScrollSliderWidth_Change ()
Vslider1.Width = HScrollSliderWidth.Value
If Vslider1.ThumbWidth > Vslider1.Width Then Vslider1.ThumbWidth = Vslider1.Width - 10
HScrollThumbWidth.Value = Vslider1.ThumbWidth
HScrollThumbHeight.Value = Vslider1.ThumbHeight
End Sub
Sub HScrollSliderWidth_Scroll ()
Vslider1.Width = HScrollSliderWidth.Value
End Sub
Sub HScrollThumbHeight_Change ()
Vslider1.ThumbHeight = HScrollThumbHeight.Value
End Sub
Sub HScrollThumbHeight_Scroll ()
Vslider1.ThumbHeight = HScrollThumbHeight.Value
End Sub
Sub HScrollThumbWidth_Change ()
Vslider1.ThumbWidth = HScrollThumbWidth.Value
End Sub
Sub HScrollThumbWidth_Scroll ()
Vslider1.ThumbWidth = HScrollThumbWidth.Value
End Sub
Sub HScrollTickCount_Change ()
Vslider1.TickCount = HScrollTickCount.Value
End Sub
Sub HScrollTickCount_Scroll ()
Vslider1.TickCount = HScrollTickCount.Value
End Sub
Sub HScrollTickHeight_Scroll ()
End Sub
Sub HScrollTickLength_Scroll ()
End Sub
Sub HScrollTickWidth_Change ()
Vslider1.TickWidth = HScrollTickWidth.Value
End Sub
Sub HScrollTickWidth_Scroll ()
Vslider1.TickWidth = HScrollTickWidth.Value
End Sub
Sub HScrollTrackWidth_Change ()
Vslider1.TrackWidth = HScrollTrackWidth.Value
End Sub
Sub HScrollTrackWidth_Scroll ()
Vslider1.TrackWidth = HScrollTrackWidth.Value
End Sub
Sub OptionBevelInner_Click (index As Integer)
Vslider1.BevelInner = index
If OptionBevelOuter(0) = True And index = 0 Then
FrameBevelWidth.Enabled = False
FrameBorderWidth.Enabled = False
Else
FrameBevelWidth.Enabled = True
FrameBorderWidth.Enabled = True
End If
End Sub
Sub OptionBevelOuter_Click (index As Integer)
Vslider1.BevelOuter = index
If OptionBevelInner(0) = True And index = 0 Then
FrameBevelWidth.Enabled = False
FrameBorderWidth.Enabled = False
Else
FrameBevelWidth.Enabled = True
FrameBorderWidth.Enabled = True
End If
End Sub
Sub OptionThumbStyle_Click (index As Integer)
Vslider1.ThumbStyle = index
End Sub
Sub OptionTickMark_Click (index As Integer)
Vslider1.TickMarks = index
If index = 0 Then
HScrollTickCount.Enabled = False
HScrollTickWidth.Enabled = False
CmdTickColor.Enabled = False
Else
HScrollTickCount.Enabled = True
HScrollTickWidth.Enabled = True
CmdTickColor.Enabled = True
End If
End Sub
Sub OptionTrackBevel_Click (index As Integer)
Vslider1.TrackBevel = index
If index = 0 Then
HScrollTrackWidth.Enabled = False
Else
HScrollTrackWidth.Enabled = True
End If
End Sub