home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{204ADB88-FEB3-418A-A055-4C39FF91E60B}#1.0#0"; "IEComboBox.ocx"
- Begin VB.Form Form1
- Caption = "Demo of some IEComboBox Control Features"
- ClientHeight = 7095
- ClientLeft = 1815
- ClientTop = 1620
- ClientWidth = 7260
- LinkTopic = "Form1"
- ScaleHeight = 7095
- ScaleWidth = 7260
- Begin IEComboBox.IEComBox IEComBox10
- Height = 360
- Left = 3840
- TabIndex = 25
- Top = 5520
- Width = 2775
- _ExtentX = 4895
- _ExtentY = 635
- ListIndex = -1
- BackColor = 16711680
- BackColor = 16711680
- BackColor = 16711680
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "System"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin IEComboBox.IEComBox IEComBox9
- Height = 345
- Left = 3840
- TabIndex = 24
- Top = 5040
- Width = 2775
- _ExtentX = 4895
- _ExtentY = 609
- ListIndex = -1
- BackColor = 65280
- BackColor = 65280
- BackColor = 65280
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Roman"
- Size = 9.75
- Charset = 255
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin IEComboBox.IEComBox IEComBox8
- Height = 330
- Left = 3840
- TabIndex = 23
- Top = 4560
- Width = 2775
- _ExtentX = 4895
- _ExtentY = 582
- ListIndex = -1
- BackColor = 14737632
- BackColor = 14737632
- BackColor = 14737632
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Garamond"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin IEComboBox.IEComBox IEComBox7
- Height = 345
- Left = 3840
- TabIndex = 22
- Top = 4080
- Width = 2775
- _ExtentX = 4895
- _ExtentY = 609
- ListIndex = -1
- BackColor = 12632319
- BackColor = 12632319
- BackColor = 12632319
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Fixedsys"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin IEComboBox.IEComBox IEComBox6
- Height = 360
- Left = 3840
- TabIndex = 21
- Top = 3600
- Width = 2775
- _ExtentX = 4895
- _ExtentY = 635
- ListIndex = -1
- BackColor = 16761087
- BackColor = 16761087
- BackColor = 16761087
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Courier New"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin IEComboBox.IEComBox IEComBox5
- Height = 390
- Left = 600
- TabIndex = 20
- Top = 5520
- Width = 2775
- _ExtentX = 4895
- _ExtentY = 688
- ListIndex = -1
- BackColor = 16761024
- BackColor = 16761024
- BackColor = 16761024
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Comic Sans MS"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin IEComboBox.IEComBox IEComBox4
- Height = 390
- Left = 600
- TabIndex = 19
- Top = 5040
- Width = 2775
- _ExtentX = 4895
- _ExtentY = 688
- ListIndex = -1
- BackColor = 16777152
- BackColor = 16777152
- BackColor = 16777152
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Bookman Old Style"
- Size = 9.75
- Charset = 0
- Weight = 300
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin IEComboBox.IEComBox IEComBox3
- Height = 375
- Left = 600
- TabIndex = 18
- Top = 4560
- Width = 2775
- _ExtentX = 4895
- _ExtentY = 661
- ListIndex = -1
- BackColor = 12648384
- BackColor = 12648384
- BackColor = 12648384
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Book Antiqua"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin IEComboBox.IEComBox IEComBox2
- Height = 360
- Left = 600
- TabIndex = 17
- Top = 4080
- Width = 2775
- _ExtentX = 4895
- _ExtentY = 635
- ListIndex = -1
- BackColor = 12648447
- BackColor = 12648447
- BackColor = 12648447
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "Arial"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- End
- Begin IEComboBox.IEComBox IEComBox1
- Height = 315
- Left = 600
- TabIndex = 16
- Top = 3600
- Width = 2775
- _ExtentX = 4895
- _ExtentY = 556
- ListIndex = -1
- Text = "This value can be preset"
- BackColor = -2147483639
- BackColor = -2147483639
- BackColor = -2147483639
- 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
- TextCtl = 0 'False
- End
- Begin VB.CheckBox Check5
- Caption = "NoAddNew"
- Height = 255
- Left = 5760
- TabIndex = 15
- Top = 2040
- Width = 1215
- End
- Begin VB.CheckBox Check4
- Caption = "Inset Borders"
- Height = 255
- Left = 4320
- TabIndex = 14
- TabStop = 0 'False
- Top = 2040
- Width = 1335
- End
- Begin VB.Frame fraSecondBlock
- Caption = "FilePath Property"
- Height = 975
- Left = 3840
- TabIndex = 11
- Top = 2520
- Width = 2775
- Begin VB.OptionButton optSecondBlock
- Caption = "Use ""lookup1.txt"""
- Height = 255
- Index = 0
- Left = 480
- TabIndex = 13
- TabStop = 0 'False
- Top = 360
- Width = 1575
- End
- Begin VB.OptionButton optSecondBlock
- Caption = "Use ""lookup2.txt"""
- Height = 255
- Index = 1
- Left = 480
- TabIndex = 12
- TabStop = 0 'False
- Top = 600
- Value = -1 'True
- Width = 1575
- End
- End
- Begin VB.Frame fraFirstBlock
- Caption = "FilePath Property"
- Height = 975
- Left = 600
- TabIndex = 8
- Top = 2520
- Width = 2775
- Begin VB.OptionButton optFirstBlock
- Caption = "Use ""lookup2.txt"""
- Height = 255
- Index = 1
- Left = 480
- TabIndex = 10
- TabStop = 0 'False
- Top = 600
- Width = 1575
- End
- Begin VB.OptionButton optFirstBlock
- Caption = "Use ""lookup1.txt"""
- Height = 255
- Index = 0
- Left = 480
- TabIndex = 9
- TabStop = 0 'False
- Top = 360
- Value = -1 'True
- Width = 1575
- End
- End
- Begin VB.CheckBox Check3
- Caption = "Locked"
- Height = 255
- Left = 3240
- TabIndex = 2
- TabStop = 0 'False
- Top = 2040
- Width = 975
- End
- Begin VB.CheckBox Check2
- Caption = "Enabled"
- Height = 255
- Left = 2160
- TabIndex = 1
- TabStop = 0 'False
- Top = 2040
- Value = 1 'Checked
- Width = 1095
- End
- Begin VB.CheckBox Check1
- Caption = "Case Sensitive"
- Height = 255
- Left = 600
- TabIndex = 0
- TabStop = 0 'False
- Top = 2040
- Width = 1455
- End
- Begin VB.Label lblResult
- BorderStyle = 1 'Fixed Single
- Height = 495
- Left = 2040
- TabIndex = 7
- Top = 6240
- Width = 3735
- End
- Begin VB.Label Label5
- Caption = "Results:"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1080
- TabIndex = 6
- Top = 6240
- Width = 975
- End
- Begin VB.Label Label4
- Caption = "Whenever the user acknowledges a text by hitting the enter key this text will be considered as worth to memorize."
- Height = 855
- Left = 3840
- TabIndex = 5
- Top = 840
- Width = 2775
- End
- Begin VB.Label Label6
- Caption = $"Form1.frx":0000
- Height = 855
- Left = 600
- TabIndex = 4
- Top = 840
- Width = 2775
- End
- Begin VB.Label Label3
- Caption = "Version 1.07, how does it work?"
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 12
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 1680
- TabIndex = 3
- Top = 240
- Width = 3975
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- ' From Gan Seng Chai
- Option Explicit
- Private Sub CareForNewValue(intKeyPressed As Integer)
- Dim cboActiveIEComboBox As IEComBox
- Set cboActiveIEComboBox = Screen.ActiveControl
- If (intKeyPressed = 13) Then
- If (cboActiveIEComboBox.IEFound = True) Then
- lblResult.Caption = _
- "The value """ & cboActiveIEComboBox.Text & """ had already been in the list"
- Else
- ' This sample code line does make the new list value visible again,
- ' the control's default behaviour would be to get a blank field
- cboActiveIEComboBox.ListIndex = 0
- lblResult.Caption = _
- "The new value """ & cboActiveIEComboBox.Text & """ has been added to the top of the list"
- End If
- ' We need to refresh all the other comboboxes sharing the same file
- If IEComBox1.FilePath = cboActiveIEComboBox.FilePath _
- And Screen.ActiveControl.Name <> "IEComBox1" Then
- IEComBox1.Refresh
- End If
- If IEComBox2.FilePath = cboActiveIEComboBox.FilePath _
- And Screen.ActiveControl.Name <> "IEComBox2" Then
- IEComBox2.Refresh
- End If
- If IEComBox3.FilePath = cboActiveIEComboBox.FilePath _
- And Screen.ActiveControl.Name <> "IEComBox3" Then
- IEComBox3.Refresh
- End If
- If IEComBox4.FilePath = cboActiveIEComboBox.FilePath _
- And Screen.ActiveControl.Name <> "IEComBox4" Then
- IEComBox4.Refresh
- End If
- If IEComBox5.FilePath = cboActiveIEComboBox.FilePath _
- And Screen.ActiveControl.Name <> "IEComBox5" Then
- IEComBox5.Refresh
- End If
- If IEComBox6.FilePath = cboActiveIEComboBox.FilePath _
- And Screen.ActiveControl.Name <> "IEComBox6" Then
- IEComBox6.Refresh
- End If
- If IEComBox7.FilePath = cboActiveIEComboBox.FilePath _
- And Screen.ActiveControl.Name <> "IEComBox7" Then
- IEComBox7.Refresh
- End If
- If IEComBox8.FilePath = cboActiveIEComboBox.FilePath _
- And Screen.ActiveControl.Name <> "IEComBox8" Then
- IEComBox8.Refresh
- End If
- If IEComBox9.FilePath = cboActiveIEComboBox.FilePath _
- And Screen.ActiveControl.Name <> "IEComBox9" Then
- IEComBox9.Refresh
- End If
- If IEComBox10.FilePath = cboActiveIEComboBox.FilePath _
- And Screen.ActiveControl.Name <> "IEComBox10" Then
- IEComBox10.Refresh
- End If
- End If
- End Sub
- Private Sub Check1_Click()
- IEComBox1.CaseSensitive = Check1.Value
- IEComBox2.CaseSensitive = Check1.Value
- IEComBox3.CaseSensitive = Check1.Value
- IEComBox4.CaseSensitive = Check1.Value
- IEComBox5.CaseSensitive = Check1.Value
- IEComBox6.CaseSensitive = Check1.Value
- IEComBox7.CaseSensitive = Check1.Value
- IEComBox8.CaseSensitive = Check1.Value
- IEComBox9.CaseSensitive = Check1.Value
- IEComBox10.CaseSensitive = Check1.Value
- End Sub
- Private Sub Check2_Click()
- IEComBox1.Enabled = Check2.Value
- IEComBox2.Enabled = Check2.Value
- IEComBox3.Enabled = Check2.Value
- IEComBox4.Enabled = Check2.Value
- IEComBox5.Enabled = Check2.Value
- IEComBox6.Enabled = Check2.Value
- IEComBox7.Enabled = Check2.Value
- IEComBox8.Enabled = Check2.Value
- IEComBox9.Enabled = Check2.Value
- IEComBox10.Enabled = Check2.Value
- End Sub
- Private Sub Check3_Click()
- IEComBox1.Locked = Check3.Value
- IEComBox2.Locked = Check3.Value
- IEComBox3.Locked = Check3.Value
- IEComBox4.Locked = Check3.Value
- IEComBox5.Locked = Check3.Value
- IEComBox6.Locked = Check3.Value
- IEComBox7.Locked = Check3.Value
- IEComBox8.Locked = Check3.Value
- IEComBox9.Locked = Check3.Value
- IEComBox10.Locked = Check3.Value
- End Sub
- Private Sub Check4_Click()
- IEComBox1.BorderStyle = Check4.Value
- IEComBox2.BorderStyle = Check4.Value
- IEComBox3.BorderStyle = Check4.Value
- IEComBox4.BorderStyle = Check4.Value
- IEComBox5.BorderStyle = Check4.Value
- IEComBox6.BorderStyle = Check4.Value
- IEComBox7.BorderStyle = Check4.Value
- IEComBox8.BorderStyle = Check4.Value
- IEComBox9.BorderStyle = Check4.Value
- IEComBox10.BorderStyle = Check4.Value
- End Sub
- Private Sub Check5_Click()
- IEComBox1.NoAddNew = Check5.Value
- IEComBox2.NoAddNew = Check5.Value
- IEComBox3.NoAddNew = Check5.Value
- IEComBox4.NoAddNew = Check5.Value
- IEComBox5.NoAddNew = Check5.Value
- IEComBox6.NoAddNew = Check5.Value
- IEComBox7.NoAddNew = Check5.Value
- IEComBox8.NoAddNew = Check5.Value
- IEComBox9.NoAddNew = Check5.Value
- IEComBox10.NoAddNew = Check5.Value
- End Sub
- Private Sub Form_Load()
- IEComBox1.FilePath = App.Path & "\lookup1.txt"
- IEComBox2.FilePath = App.Path & "\lookup1.txt"
- IEComBox3.FilePath = App.Path & "\lookup1.txt"
- IEComBox4.FilePath = App.Path & "\lookup1.txt"
- IEComBox5.FilePath = App.Path & "\lookup1.txt"
- IEComBox6.FilePath = App.Path & "\lookup2.txt"
- IEComBox7.FilePath = App.Path & "\lookup2.txt"
- IEComBox8.FilePath = App.Path & "\lookup2.txt"
- IEComBox9.FilePath = App.Path & "\lookup2.txt"
- IEComBox10.FilePath = App.Path & "\lookup2.txt"
- End Sub
- Private Sub IEComBox1_KeyPress(KeyAscii As Integer)
- Call CareForNewValue(KeyAscii)
- End Sub
- Private Sub IEComBox10_KeyPress(KeyAscii As Integer)
- Call CareForNewValue(KeyAscii)
- End Sub
- Private Sub IEComBox2_KeyPress(KeyAscii As Integer)
- Call CareForNewValue(KeyAscii)
- End Sub
- Private Sub IEComBox3_KeyPress(KeyAscii As Integer)
- Call CareForNewValue(KeyAscii)
- End Sub
- Private Sub IEComBox4_KeyPress(KeyAscii As Integer)
- Call CareForNewValue(KeyAscii)
- End Sub
- Private Sub IEComBox5_KeyPress(KeyAscii As Integer)
- Call CareForNewValue(KeyAscii)
- End Sub
- Private Sub IEComBox6_KeyPress(KeyAscii As Integer)
- Call CareForNewValue(KeyAscii)
- End Sub
- Private Sub IEComBox7_KeyPress(KeyAscii As Integer)
- Call CareForNewValue(KeyAscii)
- End Sub
- Private Sub IEComBox8_KeyPress(KeyAscii As Integer)
- Call CareForNewValue(KeyAscii)
- End Sub
- Private Sub IEComBox9_KeyPress(KeyAscii As Integer)
- Call CareForNewValue(KeyAscii)
- End Sub
- Private Sub optFirstBlock_Click(Index As Integer)
- ' We are swapping the assigned look-up file for the first 5 controls
- ' dynamically at run-time
- If Index = 0 Then
- IEComBox1.FilePath = App.Path & "\lookup1.txt"
- IEComBox2.FilePath = App.Path & "\lookup1.txt"
- IEComBox3.FilePath = App.Path & "\lookup1.txt"
- IEComBox4.FilePath = App.Path & "\lookup1.txt"
- IEComBox5.FilePath = App.Path & "\lookup1.txt"
- Else
- IEComBox1.FilePath = App.Path & "\lookup2.txt"
- IEComBox2.FilePath = App.Path & "\lookup2.txt"
- IEComBox3.FilePath = App.Path & "\lookup2.txt"
- IEComBox4.FilePath = App.Path & "\lookup2.txt"
- IEComBox5.FilePath = App.Path & "\lookup2.txt"
- End If
- IEComBox1.Refresh
- IEComBox2.Refresh
- IEComBox3.Refresh
- IEComBox4.Refresh
- IEComBox5.Refresh
- End Sub
- Private Sub optSecondBlock_Click(Index As Integer)
- ' We are swapping the assigned look-up file for the controls 6 to 10
- ' dynamically at run-time
- If Index = 0 Then
- IEComBox6.FilePath = App.Path & "\lookup1.txt"
- IEComBox7.FilePath = App.Path & "\lookup1.txt"
- IEComBox8.FilePath = App.Path & "\lookup1.txt"
- IEComBox9.FilePath = App.Path & "\lookup1.txt"
- IEComBox10.FilePath = App.Path & "\lookup1.txt"
- Else
- IEComBox6.FilePath = App.Path & "\lookup2.txt"
- IEComBox7.FilePath = App.Path & "\lookup2.txt"
- IEComBox8.FilePath = App.Path & "\lookup2.txt"
- IEComBox9.FilePath = App.Path & "\lookup2.txt"
- IEComBox10.FilePath = App.Path & "\lookup2.txt"
- End If
- IEComBox6.Refresh
- IEComBox7.Refresh
- IEComBox8.Refresh
- IEComBox9.Refresh
- IEComBox10.Refresh
- End Sub
-