home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Multimédia la Compil' 2
/
Sybex_Multimedia_La_Compil_2.iso
/
cooltool
/
knob
/
knob.frm
next >
Wrap
Text File
|
1995-04-21
|
17KB
|
553 lines
VERSION 2.00
Begin Form FormKnob
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "Knob Properties Example"
Height = 4485
Left = 930
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 4080
ScaleWidth = 8445
Top = 1050
Width = 8565
Begin CommonDialog CMDialog1
Left = 240
Top = 4230
End
Begin Frame Frame6
BackColor = &H00C0C0C0&
Caption = "Knob Tick"
Height = 2055
Left = 6030
TabIndex = 22
Top = 60
Width = 2355
Begin CommandButton CmdTickCaptionColor
Caption = "Knob Tick Caption Color"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 120
TabIndex = 0
Top = 1560
Width = 2115
End
Begin HScrollBar HScrollTickWidth
Height = 255
LargeChange = 5
Left = 660
Max = 10
TabIndex = 1
Top = 240
Value = 2
Width = 1575
End
Begin CommandButton CmdTickColor
Caption = "Knob Tick Color"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 120
TabIndex = 2
Top = 1200
Width = 2115
End
Begin HScrollBar HScrollTickLength
Height = 255
LargeChange = 5
Left = 660
Max = 20
TabIndex = 24
Top = 540
Value = 8
Width = 1575
End
Begin HScrollBar HScrollTickGap
Height = 255
LargeChange = 5
Left = 660
Max = 10
Min = 1
TabIndex = 23
Top = 840
Value = 2
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 = 3
Top = 240
Width = 495
End
Begin Label Label2
BackColor = &H00C0C0C0&
Caption = "Length"
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 = 540
Width = 495
End
Begin Label Label4
BackColor = &H00C0C0C0&
Caption = "Gap"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 120
TabIndex = 17
Top = 840
Width = 495
End
End
Begin Frame Frame5
BackColor = &H00C0C0C0&
Caption = "Knob Bevel"
Height = 675
Left = 6030
TabIndex = 14
Top = 2490
Width = 2355
Begin HScrollBar HScrollBevelWidth
Height = 255
LargeChange = 5
Left = 120
Max = 10
TabIndex = 15
Top = 300
Value = 2
Width = 2115
End
End
Begin Frame Frame4
BackColor = &H00C0C0C0&
Caption = "MIDI CoolTools Knob"
Height = 3135
Left = 2520
TabIndex = 13
Top = 60
Width = 3435
Begin Knob Knob1
BackColor = &H00C0C0C0&
BevelWidth = 2
BorderWidth = 5
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Small Fonts"
FontSize = 6
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 2715
Indicator = 0 'Spot
IndicatorColor = &H000000FF&
IndicatorWidth = 1
KnobColor = &H00C0C0C0&
KnobStyle = 1 'Raised
Left = 120
LinkControl = ""
LinkProperty = ""
Max = 100
Min = 0
Radius = 285
TickCaptionColor= &H00000000&
TickCaptions = KNOB.FRX:0000
TickColor = &H00000000&
TickCount = 3
TickGap = 2
TickLength = 8
TickWidth = 1
Top = 330
Value = 0
Width = 3195
End
End
Begin Frame Frame3
BackColor = &H00C0C0C0&
Caption = "Knob Style"
Height = 1635
Left = 60
TabIndex = 10
Top = 60
Width = 2385
Begin OptionButton OptionKnobStyle
BackColor = &H00C0C0C0&
Caption = "Textured"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 3
Left = 1140
TabIndex = 18
Top = 540
Width = 915
End
Begin OptionButton OptionKnobStyle
BackColor = &H00C0C0C0&
Caption = "Lowered"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 2
Left = 150
TabIndex = 19
Top = 540
Width = 915
End
Begin OptionButton OptionKnobStyle
BackColor = &H00C0C0C0&
Caption = "Raised"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 1
Left = 1140
TabIndex = 20
Top = 300
Value = -1 'True
Width = 915
End
Begin OptionButton OptionKnobStyle
BackColor = &H00C0C0C0&
Caption = "Circle"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 195
Index = 0
Left = 150
TabIndex = 21
Top = 300
Width = 915
End
Begin CommandButton CmdKnobColor
Caption = "Knob 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 = 12
Top = 810
Width = 2115
End
Begin CommandButton CmdKnobBckGrdColor
Caption = "Knob Back Ground 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 = 11
Top = 1170
Width = 2115
End
End
Begin Frame Frame2
BackColor = &H00C0C0C0&
Caption = "Knob Indicator"
Height = 1455
Left = 60
TabIndex = 6
Top = 1740
Width = 2385
Begin OptionButton OptionIndicator
BackColor = &H00C0C0C0&
Caption = "Line"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Index = 1
Left = 1320
TabIndex = 26
Top = 300
Width = 825
End
Begin OptionButton OptionIndicator
BackColor = &H00C0C0C0&
Caption = "Spot"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 225
Index = 0
Left = 180
TabIndex = 25
Top = 300
Value = -1 'True
Width = 825
End
Begin CommandButton CmdKnobIndicatorColor
Caption = "Knob Indicator Color"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 315
Left = 90
TabIndex = 8
Top = 1020
Width = 2115
End
Begin HScrollBar HScrollIndicatorWidth
Enabled = 0 'False
Height = 255
LargeChange = 2
Left = 630
Max = 7
Min = 1
TabIndex = 7
Top = 660
Value = 1
Width = 1575
End
Begin Label Label3
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 = 90
TabIndex = 9
Top = 660
Width = 495
End
End
Begin Frame Frame1
BackColor = &H00C0C0C0&
Caption = "Knob Radius"
Height = 675
Left = 60
TabIndex = 4
Top = 3270
Width = 8355
Begin HScrollBar HScrollRadius
Height = 255
LargeChange = 50
Left = 90
Max = 950
Min = 140
SmallChange = 10
TabIndex = 5
Top = 300
Value = 300
Width = 8175
End
End
End
Sub CmdKnobBckGrdColor_Click ()
'
' Load the control with the current (or last selected) shapes
' FillColor
'
CMDialog1.Color = Knob1.BackColor
'
' Execute the color select dialog
'
CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
CMDialog1.Action = DLG_COLOR
'
' Assign the selected color to the shape's color properties
'
Knob1.BackColor = CMDialog1.Color
End Sub
Sub CmdKnobColor_Click ()
'
' Load the control with the current (or last selected) shapes
' FillColor
'
CMDialog1.Color = Knob1.KnobColor
'
' Execute the color select dialog
'
CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
CMDialog1.Action = DLG_COLOR
'
' Assign the selected color to the shape's color properties
'
Knob1.KnobColor = CMDialog1.Color
End Sub
Sub CmdKnobIndicatorColor_Click ()
'
' Load the control with the current (or last selected) shapes
' FillColor
'
CMDialog1.Color = Knob1.IndicatorColor
'
' Execute the color select dialog
'
CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
CMDialog1.Action = DLG_COLOR
'
' Assign the selected color to the shape's color properties
'
Knob1.IndicatorColor = CMDialog1.Color
End Sub
Sub CmdTickCaptionColor_Click ()
'
' Load the control with the current (or last selected) shapes
' FillColor
'
CMDialog1.Color = Knob1.TickCaptionColor
'
' Execute the color select dialog
'
CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
CMDialog1.Action = DLG_COLOR
'
' Assign the selected color to the shape's color properties
'
Knob1.TickCaptionColor = CMDialog1.Color
End Sub
Sub CmdTickColor_Click ()
'
' Load the control with the current (or last selected) shapes
' FillColor
'
CMDialog1.Color = Knob1.TickColor
'
' Execute the color select dialog
'
CMDialog1.Flags = CC_RGBINIT Or CC_FULLOPEN
CMDialog1.Action = DLG_COLOR
'
' Assign the selected color to the shape's color properties
'
Knob1.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 ()
Knob1.BevelWidth = HScrollBevelWidth.Value
End Sub
Sub HScrollBevelWidth_Scroll ()
Knob1.BevelWidth = HScrollBevelWidth.Value
End Sub
Sub HScrollIndicatorWidth_Change ()
Knob1.IndicatorWidth = HScrollIndicatorWidth.Value
End Sub
Sub HScrollIndicatorWidth_Scroll ()
Knob1.IndicatorWidth = HScrollIndicatorWidth.Value
End Sub
Sub HScrollRadius_Change ()
Knob1.Radius = HScrollRadius.Value
End Sub
Sub HScrollRadius_Scroll ()
Knob1.Radius = HScrollRadius.Value
End Sub
Sub HScrollTickGap_Change ()
Knob1.TickGap = HScrollTickGap.Value
End Sub
Sub HScrollTickGap_Scroll ()
Knob1.TickGap = HScrollTickGap.Value
End Sub
Sub HScrollTickLength_Change ()
Knob1.TickLength = HScrollTickLength.Value
End Sub
Sub HScrollTickLength_Scroll ()
Knob1.TickLength = HScrollTickLength.Value
End Sub
Sub HScrollTickWidth_Change ()
Knob1.TickWidth = HScrollTickWidth.Value
End Sub
Sub HScrollTickWidth_Scroll ()
Knob1.TickWidth = HScrollTickWidth.Value
End Sub
Sub OptionIndicator_Click (index As Integer)
Knob1.Indicator = index
If index = 0 Then HScrollIndicatorWidth.Enabled = False Else HScrollIndicatorWidth.Enabled = True
End Sub
Sub OptionKnobStyle_Click (index As Integer)
Knob1.KnobStyle = index
If index = 3 Then HScrollBevelWidth.Enabled = False Else HScrollBevelWidth.Enabled = True
End Sub