Adblock breaks this site

How do I..................

Discussion in 'Programming General' started by X Zero, Feb 8, 2007.

  1. X Zero

    X Zero Forum Addict

    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0
    How do I..................

    New Question

    How do i add combo history

    and so it does not add 2 of the same site.

    Code:
        On Error Resume Next
        Dim I As Integer
        Dim bFound As Boolean
        Me.Caption = WebBrowser1.LocationName & " - X-Zero Explorer"
        For I = 0 To Text1.ListCount - 1
            If Text1.List(I) = WebBrowser1.LocationURL Then
                bFound = True
                Exit For
            End If
        Next I
        mbDontNavigateNow = True
        If bFound Then
            Text1.RemoveItem I
        End If
        Text1.AddItem WebBrowser1.LocationURL, 0
        Text1.ListIndex = 0
        mbDontNavigateNow = False
    ^
    VB 6 code |
     
  2. Flaming Idiots

    Flaming Idiots Active Member
    Visual Basic Programmers

    Joined:
    Dec 22, 2005
    Posts:
    235
    Referrals:
    1
    Sythe Gold:
    0
    Two Factor Authentication User
    How do I..................

    If you are using a listbox, it should be similar to this:

    I just got a new computer, so I'm installing VS now, but it should be like this:
    Code:
    Me.Caption = WebBrowser1.DocumentTitle & " - X-Zero Explorer" 
    'DocumentTitle might be DocumentName
    If Me.ListBox1.Items.Contains(WebBrowser1.URL.ToString) Then _
        Me.ListBox1.Items.Remove(WebBrowser1.URL.ToString)
    
    Me.ListBox1.Items.Add(WebBrowser1.URL.ToString)
    
     
  3. Swan

    Swan When They Cry...
    Retired Global Moderator

    Joined:
    Jan 23, 2007
    Posts:
    4,957
    Referrals:
    0
    Sythe Gold:
    0
    Sythe's 10th Anniversary Member of the Month Winner
    How do I..................

    *jaw drops* and I was trying to do that the complicated way XD
    There have been so many posts by me with an "XD" in it in the last 5 minutes, extremely weird.

    Ah well, thanks for showing me the "easy" way :D
     
  4. kharg0

    kharg0 Active Member

    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0
    How do I..................

    is this for making a combobox remember sites?
     
  5. X Zero

    X Zero Forum Addict

    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0
    How do I..................

    yes this is for saving history
    put it under Webbrowser1_progress
     
  6. kharg0

    kharg0 Active Member

    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0
    How do I..................

    the me.caption thing says it's not declared?

    thx
     
  7. X Zero

    X Zero Forum Addict

    Joined:
    Jan 21, 2007
    Posts:
    577
    Referrals:
    0
    Sythe Gold:
    0
    How do I..................

    change it to me.text or delete that part
     
  8. kharg0

    kharg0 Active Member

    Joined:
    Feb 25, 2007
    Posts:
    131
    Referrals:
    0
    Sythe Gold:
    0
    How do I..................

    ok thx
     
< image button | Open a page in a new form? >


 
 
Adblock breaks this site