VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Autofill/Autotext

tilleul  (2 Submissions)   Custom Controls/Forms/Menus   Visual Basic 3.0   Beginner   Wed 3rd February 2021

Automatically completes text entry according to a listbox contents. Autofill/Autotext uses one text control and one listbox control to simulate an autotext feature. Works fast thanks to SendMessage API (supports loooong lists w/o trouble). Supports Up and Down arrow keys as well as PgUp and PgDn. Enter key behaves like tab. Highly commented code.

Assumes
To install, read code comments

Side Effects
The only restriction is that you cannot use the mouse wheel to scroll the listbox (mouse wheel launches the lostfocus event of the text box and the list disappears ... should find a way to trap mouse wheel)

API Declarations
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
Const LB_FINDSTRING = &H18F

Rate Autofill/Autotext (8(8 Vote))
Autofill/Autotext.bas

Autofill/Autotext Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters