Caption = "ctDATA and ctSPIN (Navigation and Spin Buttons) Demo"
ClientHeight = 5475
ClientLeft = 450
ClientTop = 1290
ClientWidth = 8595
Height = 6000
Icon = CT_DATA.FRX:0000
Left = 390
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
ScaleHeight = 5475
ScaleWidth = 8595
Top = 825
Width = 8715
Begin HScrollBar hbar
Height = 255
Left = 5520
Max = 100
TabIndex = 18
Top = 3660
Width = 2445
End
Begin TextBox TextSpin
Height = 375
Left = 7110
TabIndex = 14
Text = "0"
Top = 1440
Width = 585
End
Begin ctSPIN ctSpin3
ArrowColor = &H00000000&
ArrowSize = 0 'Small
BackColor = &H00C0C0C0&
BevelSize = 2
BorderColor = &H00000000&
DisableColor = &H00808080&
Height = 375
InitialDelay = 200
Left = 7680
RepeatRate = 100
SpinStyle = 0 'Vertical
TabIndex = 13
Top = 1440
Width = 255
End
Begin ctSPIN ctSpin2
ArrowColor = &H00000000&
ArrowSize = 0 'Small
BackColor = &H00C0C0C0&
BevelSize = 2
BorderColor = &H00000000&
DisableColor = &H00808080&
Height = 345
InitialDelay = 200
Left = 6450
RepeatRate = 100
SpinStyle = 1 'Horizontal
TabIndex = 12
Top = 4020
Width = 825
End
Begin ctSPIN ctSpin1
ArrowColor = &H00000000&
ArrowSize = 0 'Small
BackColor = &H00C0C0C0&
BevelSize = 2
BorderColor = &H00000000&
DisableColor = &H00808080&
Height = 495
InitialDelay = 200
Left = 7650
RepeatRate = 4
SpinStyle = 0 'Vertical
TabIndex = 11
Top = 2460
Width = 315
End
Begin CommandButton Command1
Caption = "E&xit"
Height = 405
Left = 7590
TabIndex = 9
Top = 4800
Width = 795
End
Begin TextBox Text2
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 345
Left = 1530
TabIndex = 7
Text = "Address #1"
Top = 2430
Width = 2235
End
Begin TextBox Text1
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 1530
TabIndex = 6
Text = "Name #1"
Top = 1860
Width = 2235
End
Begin ctDATA ctData2
AmountButtons = 1 'Three Buttons
ArrowColor = &H00000000&
ArrowSize = 1 'Large
BevelSize = 2
BorderColor = &H00000000&
DisableCenter = 0 'False
DisableLeft = 0 'False
DisableRight = 0 'False
Height = 345
Left = 3750
RepeatCenter = -1 'True
RepeatLeft = -1 'True
RepeatRate = 5
RepeatRight = -1 'True
SkipValue = 1
Style = 1 'Next Records
TabIndex = 2
Top = 3360
Width = 1005
End
Begin ctDATA ctData1
AmountButtons = 1 'Three Buttons
ArrowColor = &H00000000&
ArrowSize = 1 'Large
BevelSize = 2
BorderColor = &H00000000&
DisableCenter = 0 'False
DisableLeft = 0 'False
DisableRight = 0 'False
Height = 345
Left = 270
RepeatCenter = -1 'True
RepeatLeft = -1 'True
RepeatRate = 5
RepeatRight = -1 'True
SkipValue = 1
Style = 0 'Previous Records
TabIndex = 1
Top = 3360
Width = 1005
End
Begin ctTEXT ctText
Alignment = 0 'Left Justified
BackColor = &H00FFFFFF&
BorderColor = &H00000000&
BorderType = 0 'Regular
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 345
Left = 1230
PicPosition = 0 'Center
ShadowColor = &H00000000&
SingleLine = -1 'True
TabIndex = 8
TextAngle = 0
TextPosition = 0 'Top
ThreeDColor = &H00808080&
ThreeDText = 0 'False
Top = 3360
Width = 2535
End
Begin Label Label8
BackStyle = 0 'Transparent
Caption = "Horizontal Setting"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 255
Left = 5520
TabIndex = 19
Top = 3360
Width = 1815
End
Begin Label Label6
BackStyle = 0 'Transparent
Caption = "Character Arrays"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 255
Left = 5430
TabIndex = 17
Top = 2220
Width = 1305
End
Begin Label Label7
BackStyle = 0 'Transparent
Caption = "Spin button with a numeric value"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 435
Left = 5640
TabIndex = 16
Top = 1440
Width = 1395
End
Begin Label lbl_string
Alignment = 2 'Center
BorderStyle = 1 'Fixed Single
Caption = "Stop Sign"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 13.5
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 495
Left = 5430
TabIndex = 15
Top = 2460
Width = 2235
End
Begin Label Label5
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "The following example shows how two data controls and a label control can be set up to move through a database. Each one of the buttons has a repeating action so that continuing to press a button will continue to move through the database records."
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00000000&
Height = 1095
Left = 330
TabIndex = 10
Top = 4140
Width = 4245
End
Begin Label Label4
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Address : "
ForeColor = &H00000000&
Height = 345
Left = 450
TabIndex = 5
Top = 2460
Width = 975
End
Begin Label Label3
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Name : "
ForeColor = &H00000000&
Height = 315
Left = 570
TabIndex = 4
Top = 1890
Width = 855
End
Begin Label Label2
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "Click on any of the buttons"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
ForeColor = &H00800000&
Height = 285
Left = 1230
TabIndex = 3
Top = 3780
Width = 2295
End
Begin Shape Shape1
Height = 1665
Left = 330
Top = 1440
Width = 4095
End
Begin Label Label1
Alignment = 2 'Center
BackColor = &H00C0C0C0&
Caption = "The following demo demonstrates two differnt types of push buttons. ctDATA VBX control is a type of button that can be used to assist the user to navigate through data or pages of data. The control can be set up either with two or three buttons and a user defined bitmap or icon can be substituted for any of the arrows. The ctSPIN control is a simple spin control button that can be set up in a horizontal or vertical manner."
ForeColor = &H00800000&
Height = 1035
Left = 330
TabIndex = 0
Top = 180
Width = 7905
End
Dim nRecord As Integer
Dim nBevel As Integer
Dim nArray As Integer
Dim cString(12) As String
Sub Command1_Click ()
Unload w_data_demo
End Sub
Sub ctData1_ClickCenter ()
If (nRecord > 10) Then
nRecord = nRecord - 10
Else
nRecord = 0
End If
Text1.Text = "Name #" + Str(nRecord)
Text2.Text = "Address #" + Str(nRecord)
End Sub
Sub ctData1_ClickLeft ()
If (nRecord > 1) Then
nRecord = 1
End If
Text1.Text = "Name #" + Str(nRecord)
Text2.Text = "Address #" + Str(nRecord)
End Sub
Sub ctData1_ClickRight ()
If (nRecord > 1) Then
nRecord = nRecord - 1
End If
Text1.Text = "Name #" + Str(nRecord)
Text2.Text = "Address #" + Str(nRecord)
End Sub
Sub ctData1_MouseCenter ()
ctText.Caption = "Skip to Previous Page of Records"