Implementing some browser's features

 How can I implement a autocomplete feature like in Internet Explorer?
  and a "What's related?" feature like netscape?
Who is Participating?
watyConnect With a Mentor Commented:
' #VBIDEUtils#************************************************************
' * Programmer Name  : Waty Thierry
' * Web Site         :
' * E-Mail           :
' * Date             : 28/06/99
' * Time             : 12:24
' **********************************************************************
' * Comments         : Auto-Complete function
' *
' *
' **********************************************************************

Option Explicit
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const CB_FINDSTRING = &H14C
Private Const CB_ERR = (-1)

Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Const CB_SETCURSEL = &H14E
Private m_bEditFromCode As Boolean

Private Sub Form_Load()
   With Combo1
      .AddItem "VB Square"
      .AddItem ""
      .AddItem "VB World"
      .AddItem ""
   End With
End Sub

Private Sub Combo1_Change()
   Dim i As Long, j As Long
   Dim strPartial As String, strTotal As String
   If m_bEditFromCode Then
      m_bEditFromCode = False
      Exit Sub
   End If
   With Combo1
      strPartial = .Text
      i = SendMessage(.hwnd, CB_FINDSTRING, -1, ByVal strPartial)
      If i <> CB_ERR Then
         strTotal = .List(i)
         j = Len(strTotal) - Len(strPartial)
         If j <> 0 Then
            m_bEditFromCode = True
            .SelText = Right$(strTotal, j)
            'Select unmatched characters
            .SelStart = Len(strPartial)
            .SelLength = j
         End If
      End If
   End With
End Sub

Private Sub Combo1_KeyDown(KeyCode As Integer, Shift As Integer)
   Select Case KeyCode
      Case vbKeyDelete
         m_bEditFromCode = True
      Case vbKeyBack
         m_bEditFromCode = True
   End Select
End Sub

felipesAuthor Commented:
 Ok, you haven't implemented the What's related but I'll give you the points. :-D
This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.
Thank you,
Moderator @ Experts Exchange
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.