home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{20684719-19C6-11D3-855A-444553540000}#1.0#0"; "ACTextBoxSW.ocx"
- Begin VB.Form frmTest
- BorderStyle = 1 'Fixed Single
- Caption = "Test Auto-Complete Text Box"
- ClientHeight = 4380
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 5670
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4380
- ScaleWidth = 5670
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton Command5
- Caption = "Show List"
- Height = 285
- Left = 4560
- TabIndex = 13
- Top = 1560
- Width = 975
- End
- Begin VB.TextBox Text4
- Height = 2685
- Left = 120
- MultiLine = -1 'True
- ScrollBars = 3 'Both
- TabIndex = 12
- Top = 1560
- Width = 4335
- End
- Begin VB.CommandButton Command4
- Caption = "Clear All"
- Height = 285
- Left = 3720
- TabIndex = 5
- Top = 840
- Width = 975
- End
- Begin VB.TextBox Text3
- Height = 285
- Left = 1080
- TabIndex = 6
- Top = 1200
- Width = 3375
- End
- Begin VB.CommandButton Command3
- Caption = "Add"
- Height = 285
- Left = 4560
- TabIndex = 7
- Top = 1200
- Width = 975
- End
- Begin VB.TextBox Text2
- Height = 285
- Left = 2040
- TabIndex = 3
- Text = "1"
- Top = 840
- Width = 495
- End
- Begin VB.CommandButton Command1
- Caption = "Show"
- Height = 285
- Left = 2640
- TabIndex = 4
- Top = 840
- Width = 975
- End
- Begin VB.CommandButton Command2
- Caption = "Exist?"
- Height = 285
- Left = 4560
- TabIndex = 2
- Top = 480
- Width = 975
- End
- Begin VB.TextBox Text1
- Height = 285
- Left = 2040
- TabIndex = 1
- Text = "Computer"
- Top = 480
- Width = 2415
- End
- Begin WLACTextBoxSW.ACTextBoxSW ACTextBox1
- Height = 255
- Left = 1080
- TabIndex = 0
- Top = 120
- Width = 4455
- _ExtentX = 7858
- _ExtentY = 450
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin VB.Label Label1
- Caption = "Add Item"
- Height = 255
- Index = 3
- Left = 120
- TabIndex = 11
- Top = 1200
- Width = 735
- End
- Begin VB.Label Label1
- Caption = "Show the N item in the list"
- Height = 255
- Index = 2
- Left = 120
- TabIndex = 10
- Top = 840
- Width = 2175
- End
- Begin VB.Label Label1
- Caption = "Test if Text exists in list"
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 9
- Top = 480
- Width = 1815
- End
- Begin VB.Label Label1
- Caption = "Type Here"
- Height = 255
- Index = 0
- Left = 120
- TabIndex = 8
- Top = 120
- Width = 1215
- End
- Attribute VB_Name = "frmTest"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Command1_Click()
- MsgBox ACTextBox1.List(Text2)
- End Sub
- Private Sub Command2_Click()
- Dim i As Integer
- 'Use Exists function to test if an item exists in the ACTextBox's list
- 'Return 0 if item not found, else return the item's position
- i = ACTextBox1.Exists(Text1)
- MsgBox IIf(i = 0, "Item not found", "Item is in position " & i)
- End Sub
- Private Sub Command3_Click()
- ACTextBox1.Add Text3
- End Sub
- Private Sub Command4_Click()
- 'Clear all items from the list
- ACTextBox1.Clear
- End Sub
- Private Sub Command5_Click()
- Dim i As Integer
- Dim s As String
- 'Show all items
- With ACTextBox1
- For i = 1 To .ListCount
- s = s & .List(i) & vbCrLf
- Next i
- End With
- Text4 = s
- End Sub
- Private Sub Form_Load()
- With ACTextBox1
- 'Use Add method to add an item to the ACTextBox's list, duplicate item and
- 'item with length less than or equal to one will not be added without
- 'generating an error
-
- 'Shareware Version has a limit of maximum 15 items in the list,
- 'registered Version doesn't has this limit.
- 'Items exceed this limit in shareware version will not be added to the list
- 'without generating an error
- .Add "Last Edited Record"
- .Add "Last Chirstmas"
- .Add "Hello"
- .Add "Visual Basic"
- .Add "Visial C++"
- .Add "Visual Fox Pro"
- .Add "Computer"
- .Add "Pentium"
- .Add "How are you"
- .Add "Apple"
- .Add "Add"
- .Add "If"
- .Add "If then else"
- .Add "Game Boy"
- .Add "One"
- .Add "Two"
- .Add "Three"
- .Add "Four"
- .Add "Quennie"
- .Add "Five"
- .Add "Six"
- .Add "Seven"
- .Add "Eight"
- .Add "Nine"
- .Add "Ten"
- .Add "Eleven"
- .Add "Twelve"
- .Add "Thirteen"
- .Add "Fourteen"
- .Add "Fifteen"
- .Add "Sixteen"
- .Add "Seventeen"
- .Add "Eighteen"
- .Add "Ninteen"
- .Add "Twenty"
- .Add "Thirty"
- .Add "Fourty"
- .Add "Fifty"
- .Add "Sixty"
- .Add "Seventy"
- .Add "Eighty"
- .Add "Ninety"
- .Add "Hundred"
- .Add "Thousand"
- .Add "Million"
- .Add "Easy"
- .Add "Cat"
- .Add "Last"
- .Add "Dog"
- .Add "Tiger"
- .Add "Fish"
- .Add "Pen"
- .Add "Monitor"
- .Add "Keyboard"
- .Add "Mouse"
- .Add "Ship"
- .Add "Sheep"
- .Add "Knife"
- .Add "Ghost"
- .Add "Ghost Buster"
- .Add "File"
- .Add "Why"
- End With
- End Sub
-