Function to automatically Scroll a simple combo box when characters are typed in. When calling this
Function to automatically Scroll a simple combo box when characters are typed in. When calling this function you need to declare privately the
API Declarations
Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Rate Function to automatically Scroll a simple combo box when characters are typed in. When calling this
(1(1 Vote))
Dim iStart As Integer
Dim str As String
iStart = 1
iStart = cbo.SelStart
If iLeftOff <> 0 Then
cbo.SelStart = iLeftOff
iStart = iLeftOff
End If
str = CStr(Left(cbo.Text, iStart))
cbo.ListIndex = SendMessage(cbo.hwnd, CBFINDSTRING, -1, ByVal str)
If cbo.ListIndex = -1 Then
iLeftOff = Len(str)
cbo.Text = str
End If
cbo.SelStart = iStart
cbo.SelLength = Len(str) - iStart
iLeftOff = 0
End Function
Function to automatically Scroll a simple combo box when characters are typed in. When calling this Comments
No comments yet — be the first to post one!
Post a Comment