home *** CD-ROM | disk | FTP | other *** search
Wrap
VERSION 2.00 Begin Form w_ctslide_demo BackColor = &H00C0C0C0& BorderStyle = 1 'Fixed Single Caption = "ctSLIDE (Slider Control) Demo" ClientHeight = 5580 ClientLeft = 105 ClientTop = 945 ClientWidth = 9330 Height = 6105 Icon = CT_SLIDE.FRX:0000 Left = 45 LinkTopic = "Form1" MaxButton = 0 'False MDIChild = -1 'True ScaleHeight = 5580 ScaleWidth = 9330 Top = 480 Width = 9450 Begin ctTEXT lbl_time Alignment = 0 'Left Justified BackColor = &H00FFFFFF& BorderColor = &H00000000& BorderType = 3 'Lowered Caption = "12:00 PM" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00000000& Height = 375 Left = 7140 PicPosition = 0 'Center ShadowColor = &H00000000& SingleLine = -1 'True TabIndex = 1 TextAngle = 0 TextPosition = 1 'Center ThreeDColor = &H00808080& ThreeDText = 0 'False Top = 2160 Width = 1095 End Begin ctGROUP ctGroup1 Alignment = 0 'Left BackColor = &H00C0C0C0& BorderColor = &H00808080& BorderType = 4 'Lowered Inset Caption = "Time" ForeColor = &H00000000& Height = 1095 Left = 3600 TabIndex = 10 TextPosition = 0 'Top Top = 1560 Width = 1695 Begin ctRADIO rb_pm Alignment = 0 'Left Justify BackColor = &H00C0C0C0& Caption = "P.M." DisableColor = &H00808080& ForeColor = &H00000000& Height = 255 Left = 240 PicStyle = 2 'Style #2 ShowFocus = -1 'True TabIndex = 12 Top = 660 Value = -1 'True Width = 915 End Begin ctRADIO rb_am Alignment = 0 'Left Justify BackColor = &H00C0C0C0& Caption = "A.M." DisableColor = &H00808080& ForeColor = &H00000000& Height = 255 Left = 240 PicStyle = 2 'Style #2 ShowFocus = -1 'True TabIndex = 11 Top = 300 Value = 0 'False Width = 915 End End Begin ctSLIDE ctSlide1 BackColor = &H00C0C0C0& BorderColor = &H00000000& FontBold = -1 'True FontItalic = 0 'False FontName = "Times New Roman" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00800000& Height = 735 InnerBorder = 3 'Lowered InnerBottom = 14 InnerColor = &H00E0FFFF& InnerLeft = 10 InnerRight = 10 InnerTop = 9 KeyMove = 1 Left = 180 MaxValue = 144 MinValue = 0 OuterBorder = 0 'Regular PageMove = 5 ShowDivisions = 4 ShowIncrement = 1 ShowMax = 12 ShowMin = 0 ShowMultiply = 1 SliderOffset = 2 SliderStyle = 0 'Horizontal SliderType = 1 'Ruler TabIndex = 3 ThumbHorz = 0 ThumbStyle = 1 'Pointer #1 ThumbVert = 19 Top = 660 Value = 0 Width = 8955 End Begin ctSLIDE ctSlide_blue BackColor = &H00C0C0C0& BorderColor = &H00000000& ForeColor = &H00FFFFFF& Height = 3915 InnerBorder = 3 'Lowered InnerBottom = 10 InnerColor = &H00FF0000& InnerLeft = 10 InnerRight = 10 InnerTop = 10 KeyMove = 1 Left = 2040 MaxValue = 255 MinValue = 0 OuterBorder = 2 'Raised PageMove = 5 ShowDivisions = 4 ShowIncrement = 1 ShowMax = 4 ShowMin = 0 ShowMultiply = 64 SliderOffset = 8 SliderStyle = 1 'Vertical SliderType = 1 'Ruler TabIndex = 4 ThumbHorz = 0 ThumbStyle = 0 'Regular ThumbVert = 0 Top = 1560 Value = 0 Width = 795 End Begin ctSLIDE ctSlide_green BackColor = &H00C0C0C0& BorderColor = &H00000000& ForeColor = &H00000000& Height = 3915 InnerBorder = 3 'Lowered InnerBottom = 10 InnerColor = &H0000FF00& InnerLeft = 10 InnerRight = 10 InnerTop = 10 KeyMove = 1 Left = 1140 MaxValue = 255 MinValue = 0 OuterBorder = 2 'Raised PageMove = 5 ShowDivisions = 4 ShowIncrement = 1 ShowMax = 4 ShowMin = 0 ShowMultiply = 64 SliderOffset = 8 SliderStyle = 1 'Vertical SliderType = 1 'Ruler TabIndex = 9 ThumbHorz = 0 ThumbStyle = 0 'Regular ThumbVert = 0 Top = 1560 Value = 0 Width = 795 End Begin ctSLIDE ctSlide_red BackColor = &H00C0C0C0& BorderColor = &H00000000& ForeColor = &H00FFFFFF& Height = 3945 InnerBorder = 3 'Lowered InnerBottom = 10 InnerColor = &H000000FF& InnerLeft = 10 InnerRight = 10 InnerTop = 10 KeyMove = 1 Left = 240 MaxValue = 255 MinValue = 0 OuterBorder = 2 'Raised PageMove = 5 ShowDivisions = 4 ShowIncrement = 1 ShowMax = 4 ShowMin = 0 ShowMultiply = 64 SliderOffset = 8 SliderStyle = 1 'Vertical SliderType = 1 'Ruler TabIndex = 8 ThumbHorz = 0 ThumbStyle = 0 'Regular ThumbVert = 0 Top = 1560 Value = 0 Width = 795 End Begin ctFRAME uo_color BackColor = &H00000000& BorderColor = &H00FFFFFF& DistanceApart = 5 Height = 1155 InnerBorder = 1 'None InnerWidth = 1 Left = 3300 OuterBorder = 0 'Regular OuterWidth = 1 ShadowColor = &H00808080& ShowBottom = -1 'True ShowLeft = -1 'True ShowRight = -1 'True ShowTop = -1 'True TabIndex = 7 Top = 3360 Width = 1935 End Begin CommandButton Command1 Caption = "E&xit" Height = 375 Left = 7920 TabIndex = 6 Top = 5040 Width = 855 End Begin Label Label5 BackStyle = 0 'Transparent Caption = "The Slider Control uses a ""SlideChange"" event to determine then the sliders value has changed. This offers an easy way to run a script as the user moves the thumb control." FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 9.75 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 1515 Left = 5760 TabIndex = 14 Top = 3240 Width = 2895 End Begin Label Label2 BackStyle = 0 'Transparent Caption = "Time Selected :" Height = 255 Left = 5700 TabIndex = 2 Top = 2220 Width = 1455 End Begin Label Label1 BackColor = &H00C0C0C0& Caption = "Move the thumb to change the selected time" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False ForeColor = &H00800000& Height = 435 Left = 5580 TabIndex = 13 Top = 1680 Width = 2295 End Begin Label Label4 Alignment = 2 'Center BackColor = &H00C0C0C0& Caption = "The ctSLIDE VBX is a slider control. It can be set up horizontally or vertically. It comes with pre-defined background styles, and thumbs, or the programmer can replace either with a bitmap image." ForeColor = &H00800000& Height = 435 Left = 180 TabIndex = 5 Top = 120 Width = 8895 End Begin Label Label3 BackColor = &H00C0C0C0& Caption = "Click on any of the thumbs and then adjust the slider control to change the box color" FontBold = 0 'False FontItalic = 0 'False FontName = "MS Sans Serif" FontSize = 8.25 FontStrikethru = 0 'False FontUnderline = 0 'False Height = 675 Left = 3180 TabIndex = 0 Top = 4680 Width = 2235 End Sub Command1_Click () Unload w_ctslide_demo End Sub Sub ctSlide_Blue_SlideChange () uo_color.BackColor = RGB(ctslide_red, ctslide_green, ctslide_blue) End Sub Sub ctSlide_Green_SlideChange () uo_color.BackColor = RGB(ctslide_red, ctslide_green, ctslide_blue) End Sub Sub ctSlide_Red_SlideChange () uo_color.BackColor = RGB(ctslide_red, ctslide_green, ctslide_blue) End Sub Sub ctSlide1_SlideChange () settime End Sub Sub Form_Load () ' Center the window on the screen Move (Screen.Width - Width) / 2, (Screen.Height - Height) * .15 w_mdi_main.bt_slide = BUTTON_DISABLE End Sub Sub Form_Unload (Cancel As Integer) w_mdi_main.bt_slide = BUTTON_UP End Sub Sub rb_am_Click () settime End Sub Sub rb_pm_Click () settime End Sub 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