home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{8E4795DA-35BA-11D1-AEFE-004005126284}#2.0#0"; "Wheels.ocx"
- Begin VB.Form Form1
- BorderStyle = 4 'Fixed ToolWindow
- Caption = "Wheel Demo"
- ClientHeight = 6270
- ClientLeft = 45
- ClientTop = 285
- ClientWidth = 7650
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 6270
- ScaleWidth = 7650
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 'Windows Default
- Begin VB.TextBox Text1
- Height = 3495
- Left = 120
- MultiLine = -1 'True
- TabIndex = 9
- Text = "Form1.frx":0000
- Top = 2700
- Width = 6195
- End
- Begin VB.CommandButton Command1
- Caption = "About ..."
- Height = 495
- Left = 6420
- TabIndex = 8
- Top = 2700
- Width = 1035
- End
- Begin Wheels.Wheel Wheel2
- Height = 180
- Left = 1560
- TabIndex = 7
- Top = 2280
- Width = 1650
- _ExtentX = 2910
- _ExtentY = 318
- Style = 1
- End
- Begin Wheels.Wheel Wheel1
- Height = 1650
- Index = 0
- Left = 120
- TabIndex = 4
- Top = 420
- Width = 180
- _ExtentX = 318
- _ExtentY = 2910
- End
- Begin VB.PictureBox Picture1
- BackColor = &H00FFFFFF&
- Height = 1995
- Left = 1500
- ScaleHeight = 1935
- ScaleWidth = 1695
- TabIndex = 0
- ToolTipText = "test"
- Top = 120
- Width = 1755
- End
- Begin Wheels.Wheel Wheel1
- Height = 1650
- Index = 1
- Left = 600
- TabIndex = 5
- Top = 420
- Width = 180
- _ExtentX = 318
- _ExtentY = 2910
- End
- Begin Wheels.Wheel Wheel1
- Height = 1650
- Index = 2
- Left = 1080
- TabIndex = 6
- Top = 420
- Width = 180
- _ExtentX = 318
- _ExtentY = 2910
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "255"
- Height = 255
- Index = 2
- Left = 1020
- TabIndex = 3
- Top = 0
- Width = 375
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "255"
- Height = 255
- Index = 1
- Left = 540
- TabIndex = 2
- Top = 0
- Width = 375
- End
- Begin VB.Label Label1
- BorderStyle = 1 'Fixed Single
- Caption = "255"
- Height = 255
- Index = 0
- Left = 60
- TabIndex = 1
- Top = 0
- Width = 375
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Dim arrRGB(3) As Byte
- Private Sub Command1_Click()
- Wheel2.About
- End Sub
- Private Sub Form_Load()
- arrRGB(0) = 255
- arrRGB(1) = 255
- arrRGB(2) = 255
- End Sub
- Private Sub Wheel1_Wheel(Index As Integer, Direction As Wheels.Direction)
- Select Case Direction
- Case wheelUp, wheelRight
- If arrRGB(Index) < 255 Then
- arrRGB(Index) = arrRGB(Index) + 1
- End If
-
- Case wheelDown, wheelLeft
- If arrRGB(Index) > 0 Then
- arrRGB(Index) = arrRGB(Index) - 1
- End If
-
- End Select
- Picture1.BackColor = RGB(arrRGB(0), arrRGB(1), arrRGB(2))
- Label1(Index) = arrRGB(Index)
- End Sub
- Private Sub Wheel2_Wheel(Direction As Wheels.Direction)
- Const MIN_WIDTH = 300
- Const MIN_BORDER = 100
- With Picture1
- If Direction = wheelRight Then
- If .Left + .Width < ScaleWidth - MIN_BORDER Then
- .Width = .Width + 50
- End If
- Else
- If .Width > MIN_WIDTH Then
- .Width = .Width - 50
- End If
- End If
- End With
- End Sub
-