• Log in or sign up for an account here: https://www.sythe.org/login

A few questions

1. Where do I put that.
2. I want it so no duplicate entries are in the combobox whether then press enter, go, back, forward, refresh or if the client starts like that.

The page that it's starts on has Iframes and it seems to add the homepage for each iframe it has on there. I don't want that to happen.
 
Change...
Code:
Private Sub Wweb_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
    cboURL.Text = Wweb.LocationURL
    cboURL.AddItem Wweb.LocationURL
End Sub

to...
Code:
Private Sub Wweb_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
On Error Resume Next
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
End Sub
 
Thanks. It worked,

Now I need the items to go to the top of the list instead of the bottom.
 
Oh and also...

One of my mates requested a browser that can only look at certain links since the normal one had no in-built security things.

I've heard of this code:
Code:
      ' Cancel any navigation that moves outside VB helper.
Private Sub Wweb_BeforeNavigate2(ByVal pDisp As _
    Object, URL As Variant, Flags As Variant, _
    TargetFrameName As Variant, PostData As Variant, _
    Headers As Variant, Cancel As Boolean)
    On Error Resume Next
Const TARGET = "http://www.sythe.org/"
    Cancel = (LCase$(Left$(URL, Len(TARGET))) <> TARGET)
    If Cancel Then MsgBox URL & " is blocked"
End Sub

But it will only let me put in one.

If I put in
Code:
      ' Cancel any navigation that moves outside VB helper.
Private Sub Wweb_BeforeNavigate2(ByVal pDisp As _
    Object, URL As Variant, Flags As Variant, _
    TargetFrameName As Variant, PostData As Variant, _
    Headers As Variant, Cancel As Boolean)
    On Error Resume Next
Const TARGET = "http://www.ryanslair.com/"
Const TARGET = "http://www.runescape.com/"
Const TARGET = "http://www.runehq.com/"
Const TARGET = "http://forum.tip.it/"
Const TARGET = "http://www.tip.it/runescape/"
Const TARGET = "http://runehq.net/"
Const TARGET = "http://rhqclan.com/"
Const TARGET = "http://en.wikipedia.org/"
Const TARGET = "http://wikipedia.org/"
Const TARGET = "http://www.google.com/"
Const TARGET = "http://www.sythe.org/"
    Cancel = (LCase$(Left$(URL, Len(TARGET))) <> TARGET)
    If Cancel Then MsgBox URL & " is blocked"
End Sub

It would not work.

Help (again) Pl0x?
 
Sorry dude, you should ask someone better with VB I didn't try too hard but I can't be bothered...
 
If I put in
Code:
      ' Cancel any navigation that moves outside VB helper.
Private Sub Wweb_BeforeNavigate2(ByVal pDisp As _
    Object, URL As Variant, Flags As Variant, _
    TargetFrameName As Variant, PostData As Variant, _
    Headers As Variant, Cancel As Boolean)
    On Error Resume Next
Const TARGET = "http://www.ryanslair.com/"
Const TARGET = "http://www.runescape.com/"
Const TARGET = "http://www.runehq.com/"
Const TARGET = "http://forum.tip.it/"
Const TARGET = "http://www.tip.it/runescape/"
Const TARGET = "http://runehq.net/"
Const TARGET = "http://rhqclan.com/"
Const TARGET = "http://en.wikipedia.org/"
Const TARGET = "http://wikipedia.org/"
Const TARGET = "http://www.google.com/"
Const TARGET = "http://www.sythe.org/"
    Cancel = (LCase$(Left$(URL, Len(TARGET))) <> TARGET)
    If Cancel Then MsgBox URL & " is blocked"
End Sub
It would not work.

Help (again) Pl0x?

defining the same name, over and over again <_< I am assuming that only sythe.org is blocked? if that....



Code:
Private Sub Wweb_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
      On Error Resume Next
      Const Banned = "ryanslair.com|runescape.com|runehq.com|forum.tip.it|tip.it/runescape|runehq.net|rhqclan.com|en.wikipedia.org|wikipedia.org|google.com|sythe.org/"
      Dim Bnd() As String
      Bnd() = Split(Banned, "|")
      For i = 0 To UBound(Bnd())
            If InStr(1, URL, Trim(Bnd(i))) <> 0 Then
                  WebBrowser1.Document.write "<h4> This site has been banned, " & _
                                             "bugger off </h4>"
                  Cancel = True
            End If
      Next i
End Sub
 
I want the exact opposite as that.

I want it so any site that ISN'T on the list can't be loaded.
 
change line
If InStr(1, URL, Trim(Bnd(i))) <> 0 Then
to
If InStr(1, URL, Trim(Bnd(i))) = 0 Then
 
Didn't Work.

Okay. ANOTHER PROBLEM.

If you click a link it goes into the cboURL box. How do I stop that?

Also, when I click the Google Search Combobox and button that I added, it adds them links to the CboURL box.

And when you click links in cboURL it shows the link in the textbox part but it doesn't navigate there. How do I make it navigate when you click a link in the dropdown box?

Last but not least, I added a homepage thing. All the places you visit in cboURL go into the cboHome box so you can choose sites that you've visited to make your Homepage. Well if you go into that and then go into the Webbrowser and press enter, it resets everything in cboHome and nothing goes back in there.

CODES:

Form1 (Webbrowser) - Quite messy but will fix later.
Code:
Private Sub Form_Close()
Unload Me
Unload Form1
Unload Form2
End Sub
Private Sub Close_Click()
Unload Me
Unload Form1
Unload Form2
End Sub

Private Sub Form_Load()
Wweb.Silent = True
Wweb.Navigate Form2.cboHome.Text
End Sub
Private Sub CmdHome_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdhomeoc.Visible = True
Wweb.Navigate Form2.cboHome.Text
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
End Sub
Private Sub CmdHomeOC_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdhome.Visible = True
cmdhomeoc.Visible = False
Wweb.Navigate Form2.cboHome.Text
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
Form2.cboHome.AddItem Wweb.LocationURL
End Sub
Private Sub CmdHomeOC_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
cmdhomeoc.Visible = False
End Sub
Private Sub CmdHome_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdhomeoc.Visible = False
Wweb.Navigate Form2.cboHome.Text
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
Form2.cboHome.AddItem Wweb.LocationURL
End Sub
Private Sub ForumsOC_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
Forums.Visible = True
ForumsOC.Visible = False
Wweb.Navigate ("http://www.ryanslair.com/BloodVulturesForums")
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
Form2.cboHome.AddItem Wweb.LocationURL
End Sub
Private Sub ForumsOC_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
ForumsOC.Visible = False
End Sub
Private Sub Forums_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
ForumsOC.Visible = False
End Sub
Private Sub cmdBack_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdBackOC.Visible = True
Wweb.GoBack
End Sub
Private Sub cmdBackOC_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdBack.Visible = True
cmdBackOC.Visible = False
Wweb.GoBack
End Sub
Private Sub cmdBackOC_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdBackOC.Visible = False
End Sub

Private Sub cmdBack_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdBackOC.Visible = False
End Sub
Private Sub cmdForward_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdForwardOC.Visible = True
Wweb.GoForward
End Sub
Private Sub cmdForwardOC_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdForward.Visible = True
cmdForwardOC.Visible = False
Wweb.GoForward
End Sub
Private Sub cmdForward_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdForwardOC.Visible = False
End Sub
Private Sub cmdForwardOC_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdForwardOC.Visible = False
End Sub
Private Sub cmdStop_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdStopOC.Visible = True
Wweb.Stop
End Sub
Private Sub cmdStopOC_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdStop.Visible = True
cmdStopOC.Visible = False
Wweb.Stop
End Sub
Private Sub cmdStopOC_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdStopOC.Visible = False
End Sub
Private Sub cmdStop_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdStopOC.Visible = False
End Sub
Private Sub cmdRefresh_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdRefreshOC.Visible = True
Wweb.Refresh
End Sub
Private Sub cmdRefreshOC_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdRefresh.Visible = True
cmdRefreshOC.Visible = False
Wweb.Refresh
End Sub
Private Sub cmdRefresh_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdRefreshOC.Visible = False
End Sub

Private Sub cmdRefreshOC_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdRefreshOC.Visible = False
End Sub
Private Sub cmdGo_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdGoOC.Visible = True
Wweb.Navigate cboURL.Text
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
Form2.cboHome.AddItem Wweb.LocationURL
End Sub
Private Sub cmdGoOC_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdGo.Visible = True
cmdGoOC.Visible = False
Wweb.Navigate cboURL.Text
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
Form2.cboHome.AddItem Wweb.LocationURL
End Sub
Private Sub cmdGo_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdGoOC.Visible = False
End Sub
Private Sub cmdGoOC_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
cmdGoOC.Visible = False
End Sub


Private Sub Search_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
search.Visible = False
searchOC.Visible = True
        Wweb.Navigate ("http://www.google.com/search?hl=en&q=" + Googlesearchbox.Text + "&btnG=Google+Search")
            Dim i As Integer
    For i = 0 To Googlesearchbox.ListCount - 1
        If Googlesearchbox.List(i) = Googlesearchbox.Text Then Exit Sub
    Next i
Googlesearchbox.AddItem Googlesearchbox.Text
End Sub
Private Sub SearchOC_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
searchOC.Visible = False
search.Visible = True
        Wweb.Navigate ("http://www.google.com/search?hl=en&q=" + Googlesearchbox.Text + "&btnG=Google+Search")
            Dim i As Integer
    For i = 0 To Googlesearchbox.ListCount - 1
        If Googlesearchbox.List(i) = Googlesearchbox.Text Then Exit Sub
    Next i
Googlesearchbox.AddItem Googlesearchbox.Text
End Sub
Private Sub Search_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
searchOC.Visible = False
search.Visible = True
        Wweb.Navigate ("http://www.google.com/search?hl=en&q=" + Googlesearchbox.Text + "&btnG=Google+Search")
            Dim i As Integer
    For i = 0 To Googlesearchbox.ListCount - 1
        If Googlesearchbox.List(i) = Googlesearchbox.Text Then Exit Sub
    Next i
Googlesearchbox.AddItem Googlesearchbox.Text
End Sub
Private Sub SearchOC_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
searchOC.Visible = False
search.Visible = True
        Wweb.Navigate ("http://www.google.com/search?hl=en&q=" + Googlesearchbox.Text + "&btnG=Google+Search")
            Dim i As Integer
    For i = 0 To Googlesearchbox.ListCount - 1
        If Googlesearchbox.List(i) = Googlesearchbox.Text Then Exit Sub
    Next i
Googlesearchbox.AddItem Googlesearchbox.Text
End Sub

Private Sub cboURL_KeyPress(KeyAscii As Integer)
 If KeyAscii = 13 Then
    Wweb.Navigate cboURL.Text
 End If
 Dim i As Integer
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
Form2.cboHome.AddItem Wweb.LocationURL
End Sub
Private Sub Googlesearchbox_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
    Wweb.Navigate ("http://www.google.com/search?hl=en&q=" + Googlesearchbox.Text + "&btnG=Google+Search")
            Dim i As Integer
    For i = 0 To Googlesearchbox.ListCount - 1
        If Googlesearchbox.List(i) = Googlesearchbox.Text Then Exit Sub
    Next i
Googlesearchbox.AddItem Googlesearchbox.Text
    End If
End Sub

Private Sub Tools_Click()
Form2.Visible = True
End Sub

Private Sub Wweb_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
On Error Resume Next
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
Form2.cboHome.AddItem Wweb.LocationURL
End Sub
Private Sub Search_Click()
                Wweb.Navigate ("http://www.google.com/search?hl=en&q=" + Googlesearchbox.Text + "&btnG=Google+Search")
            Dim i As Integer
    For i = 0 To Googlesearchbox.ListCount - 1
        If Googlesearchbox.List(i) = Googlesearchbox.Text Then Exit Sub
    Next i
Googlesearchbox.AddItem Googlesearchbox.Text
End Sub
    Private Sub SearchOC_Click()
        Wweb.Navigate ("http://www.google.com/search?hl=en&q=" + Googlesearchbox.Text + "&btnG=Google+Search")
            Dim i As Integer
    For i = 0 To Googlesearchbox.ListCount - 1
        If Googlesearchbox.List(i) = Googlesearchbox.Text Then Exit Sub
    Next i
Googlesearchbox.AddItem Googlesearchbox.Text
    End Sub
Private Sub Google_Click()
        Wweb.Navigate ("http://www.google.com/")
End Sub

Private Sub cmdBack_Click()
On Error Resume Next
Wweb.GoBack
End Sub

Private Sub cmdForward_Click()
On Error Resume Next
Wweb.GoForward
End Sub

Private Sub cmdStop_Click()
On Error Resume Next
Wweb.Stop
End Sub

Private Sub cmdRefresh_Click()
Wweb.Refresh
End Sub

Private Sub cmdGo_Click()
Wweb.Navigate cboURL.Text
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
Form2.cboHome.AddItem Wweb.LocationURL
End Sub
Private Sub cmdBackCO_Click()
On Error Resume Next
Wweb.GoBack
End Sub

Private Sub cmdForwardCO_Click()
On Error Resume Next
Wweb.GoForward
End Sub

Private Sub cmdStopCO_Click()
On Error Resume Next
Wweb.Stop
End Sub

Private Sub cmdRefreshCO_Click()
Wweb.Refresh
End Sub

Private Sub cmdGoCO_click()
Wweb.Navigate cboURL.Text
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
Form2.cboHome.AddItem Wweb.LocationURL
End Sub

Private Sub cmdForums_click()
Wweb.Navigate ("http://www.ryanslair.com/BloodVulturesForums")
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
Form2.cboHome.AddItem Wweb.LocationURL
End Sub

Private Sub cmdForumsCO_click()
Wweb.Navigate ("http://www.ryanslair.com/BloodVulturesForums")
Dim i As Integer
    cboURL.Text = Wweb.LocationURL
    For i = 0 To cboURL.ListCount - 1
        If cboURL.List(i) = Wweb.LocationURL Then Exit Sub
    Next i
cboURL.AddItem Wweb.LocationURL
Form2.cboHome.AddItem Wweb.LocationURL
End Sub

      Private Function IsPopupWindow() As Boolean
      On Error Resume Next
      If Wweb.Document.activeElement.tagName = "BODY" Or Wweb.Document.activeElement.tagName = "IFRAME" Then
      IsPopupWindow = True
      Else
      IsPopupWindow = False
      End If
      End Function
      
      Private Sub Wweb_NewWindow2(ppDisp As Object, Cancel As Boolean)
      Dim frm As Form1
      Cancel = IsPopupWindow
      If Cancel = False Then
      Set frm = New Form1
      Set ppDisp = frm.Wweb.object
      frm.Show
      End If
      End Sub

Form2 (Homepage Box)
Code:
Private Sub Form1_Close()
Unload Me
Unload Form1
Unload Form2
End Sub

Private Sub OK_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
OKOC.Visible = True
End Sub
Private Sub OKOC_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
On Error Resume Next
OK.Visible = True
OKOC.Visible = False
End Sub
Private Sub OKOC_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
OKOC.Visible = False
    Form2.Visible = False
    End Sub
    
    Private Sub OK_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
OKOC.Visible = False
    Form2.Visible = False
End Sub

That is all :P

EDIT:

OH THAT REMINDS ME!

I want the browser to remember everything entered in ALL comboboxes so when they load the browser up again, everything is still there.
 
why not just use search buttons, there are alot of guides on how to create a broswer on sythe.
 
why not just use search buttons, there are alot of guides on how to create a broswer on sythe.

What you said is of no relevance of what I ask and if you meant something else maybe explain it a little better.

No shit theres lots of Web Browser Guides, but not all of them include the functions i want to include in mine.

All the tutorials out there are pretty much "Just for Fun" tutorials and I want some Half-Serious ones.
 
Runescape Gamblingrunescape gambling
Back
Top