home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form w_slide_demo
- BorderStyle = 3 'Fixed Dialog
- Caption = "ctSlide (Slider Control) Demo"
- ClientHeight = 6525
- ClientLeft = 1380
- ClientTop = 1470
- ClientWidth = 9420
- Height = 6930
- Icon = "ct_slide.frx":0000
- Left = 1320
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MDIChild = -1 'True
- MinButton = 0 'False
- ScaleHeight = 6525
- ScaleWidth = 9420
- ShowInTaskbar = 0 'False
- Top = 1125
- Width = 9540
- Begin VB.CommandButton Command1
- Caption = "E&xit"
- Height = 495
- Left = 8040
- TabIndex = 11
- Top = 5820
- Width = 1035
- End
- Begin VB.Frame Frame1
- Caption = "Time"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 735
- Left = 3060
- TabIndex = 10
- Top = 2280
- Width = 2475
- Begin VB.OptionButton rb_pm
- Caption = "P.M."
- Height = 255
- Left = 1380
- TabIndex = 13
- Top = 300
- Value = -1 'True
- Width = 915
- End
- Begin VB.OptionButton rb_am
- Caption = "A.M."
- Height = 255
- Left = 240
- TabIndex = 12
- Top = 300
- Width = 855
- End
- End
- Begin FrameLibCtl.ctFrame uo_color
- Height = 915
- Left = 2940
- TabIndex = 8
- Top = 4560
- Width = 1575
- _version = 65536
- _extentx = 2778
- _extenty = 1614
- _stockprops = 32
- backcolor = 0
- bordercolor = 16777215
- End
- Begin VB.Label Label6
- Caption = "Move the thumb on the top slider to change the selected time"
- ForeColor = &H00800000&
- Height = 555
- Left = 3060
- TabIndex = 18
- Top = 1620
- Width = 2595
- End
- Begin VB.Label lbl_time
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "12:00 P.M."
- Height = 375
- Left = 4560
- TabIndex = 17
- Top = 3300
- Width = 1035
- End
- Begin VB.Label Label4
- Caption = "Time Selected :"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 315
- Left = 3060
- TabIndex = 16
- Top = 3300
- Width = 1515
- End
- Begin VB.Label Label3
- Caption = "The slider control to the left is an example of replacing the controls standard background and thumb image with our own bitmaps"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 9.75
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 2115
- Left = 7560
- TabIndex = 15
- Top = 1740
- Width = 1575
- End
- Begin SlideLib.ctSlide ctSlide2
- Height = 4695
- Left = 6720
- TabIndex = 14
- Top = 1620
- Width = 555
- _version = 65536
- _extentx = 979
- _extenty = 8281
- _stockprops = 68
- outerborder = 1
- sliderstyle = 1
- thumbstyle = 3
- slidertype = 2
- innerbottom = 0
- innerleft = 0
- innerright = 0
- innertop = 0
- slideroffset = 8
- pictureback = "ct_slide.frx":030A
- picturethumb = "ct_slide.frx":0F5C
- innercolor = 12632256
- End
- Begin VB.Label Label2
- Caption = "Click on any of the thumbs and then adjust the slider control to change the box color"
- Height = 675
- Left = 2940
- TabIndex = 9
- Top = 5640
- Width = 2475
- End
- Begin VB.Label lbl_blue
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "0"
- Height = 315
- Left = 1920
- TabIndex = 7
- Top = 5940
- Width = 735
- End
- Begin VB.Label lbl_green
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "0"
- Height = 315
- Left = 1080
- TabIndex = 6
- Top = 5940
- Width = 735
- End
- Begin VB.Label lbl_red
- Alignment = 2 'Center
- BackColor = &H00FFFFFF&
- BorderStyle = 1 'Fixed Single
- Caption = "0"
- Height = 315
- Left = 240
- TabIndex = 5
- Top = 5940
- Width = 735
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = $"ct_slide.frx":12AE
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 180
- TabIndex = 4
- Top = 120
- Width = 8955
- End
- Begin SlideLib.ctSlide ctSlide_blue
- Height = 4275
- Left = 1920
- TabIndex = 3
- Top = 1560
- Width = 735
- _version = 65536
- _extentx = 1296
- _extenty = 7541
- _stockprops = 68
- innerborder = 3
- outerborder = 2
- sliderstyle = 1
- maxvalue = 256
- slideroffset = 8
- pictureback = "ct_slide.frx":136D
- picturethumb = "ct_slide.frx":1389
- innercolor = 16711680
- barcolor = 16776960
- End
- Begin SlideLib.ctSlide ctSlide_green
- Height = 4275
- Left = 1080
- TabIndex = 2
- Top = 1560
- Width = 735
- _version = 65536
- _extentx = 1296
- _extenty = 7541
- _stockprops = 68
- innerborder = 3
- outerborder = 2
- sliderstyle = 1
- maxvalue = 256
- slideroffset = 8
- pictureback = "ct_slide.frx":13A5
- picturethumb = "ct_slide.frx":13C1
- innercolor = 65280
- End
- Begin SlideLib.ctSlide ctSlide_red
- Height = 4275
- Left = 240
- TabIndex = 1
- Top = 1560
- Width = 735
- _version = 65536
- _extentx = 1296
- _extenty = 7541
- _stockprops = 68
- innerborder = 3
- outerborder = 2
- sliderstyle = 1
- maxvalue = 256
- slideroffset = 8
- pictureback = "ct_slide.frx":13DD
- picturethumb = "ct_slide.frx":13F9
- innercolor = 255
- barcolor = 65535
- End
- Begin SlideLib.ctSlide ctSlide1
- Height = 735
- Left = 240
- TabIndex = 0
- Top = 660
- Width = 8895
- _version = 65536
- _extentx = 15690
- _extenty = 1296
- _stockprops = 68
- BeginProperty font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- name = "Times New Roman"
- charset = 0
- weight = 700
- size = 8.25
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- innerborder = 3
- thumbstyle = 1
- slidertype = 1
- maxvalue = 144
- innerbottom = 20
- innertop = 6
- showmax = 12
- thumbvert = 20
- forecolor = 8388608
- innercolor = 14745599
- End
- Attribute VB_Name = "w_slide_demo"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Sub settime()
- Dim cHour As String
- Dim cMin As String
- Dim cTime As String
- Dim nHour As Integer
- Dim nMin As Integer
- nHour = Int(ctSlide1.Value / 12)
- nMin = (ctSlide1.Value Mod 12) * 5
- If nHour = 0 Then
- cHour = "12"
- cHour = Str(nHour)
- End If
- cMin = Right$("00" + Trim$(Str$(nMin)), 2)
- If (ctSlide1.Value = 144 And Not rb_pm) Then
- cTime = "P.M."
- ElseIf (ctSlide1.Value = 144 And rb_pm) Then
- cTime = "A.M."
- ElseIf (rb_pm) Then
- cTime = "P.M."
- cTime = "A.M."
- End If
- lbl_time.Caption = (cHour + ":" + cMin + " " + cTime)
- End Sub
- Private Sub ctSlide1_SlideChange()
- settime
- End Sub
- Private Sub Command1_Click()
- Unload w_slide_demo
- End Sub
- Private Sub ctSlide_blue_SlideChange()
- uo_color.BackColor = RGB(ctSlide_red, ctSlide_green, ctSlide_blue)
- lbl_blue = Str(ctSlide_blue.Value)
- End Sub
- Private Sub ctSlide_green_SlideChange()
- uo_color.BackColor = RGB(ctSlide_red, ctSlide_green, ctSlide_blue)
- lbl_green = Str(ctSlide_green.Value)
- End Sub
- Private Sub ctSlide_red_SlideChange()
- uo_color.BackColor = RGB(ctSlide_red, ctSlide_green, ctSlide_blue)
- lbl_red = Str(ctSlide_red.Value)
- End Sub
- Private Sub Form_Load()
- ' Center the window on the screen
- Move (Screen.Width - Width) / 2, (Screen.Height - Height) * 0.1
- End Sub
- Private Sub rb_am_Click()
- settime
- End Sub
- Private Sub rb_pm_Click()
- settime
- End Sub
-