Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
Webbrowser troubles.
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 06-07-2007, 02:54 AM
Covey's Avatar
Creator of EliteSwitch
Ex-Moderator Visual Basic Programmers
 
Join Date: Sep 2005
Location: Fuckin' BAM!
Posts: 4,464
Exclamation Webbrowser troubles.

How do i stop the webbrowser redirecting to Runescape.com when i try to go to the worlds?

It doesn't seem to have a beforenavigate sub.
I've tried the "navigating" sub but:
Code:
if e.url = "http://www.runescape.com" then
e.cancel = true
end if
doesn't seem to work (it gives some error) :O

Also i saw dodge post this but don't quite understand how to use it:
Code:
Dim Webpage As AxSHDocVw.AxWebBrowser = New AxSHDocVw.AxWebBrowser  'create new browser instance
        AddHandler Webpage.BeforeNavigate2, AddressOf Me.Webpage_BeforeNavigate2
        AddHandler Webpage.NavigateComplete2, AddressOf Me.Webpage_NavigateComplete2
        Webpage.RegisterAsBrowser = True
        Webpage.Silent = True
        Webpage.Visible = True 
        Webpage.Navigate("URL")
EDIT
im gonna probably be posting alot of simple fix questions because im starting in .net now
__________________
EliteSwitch v4 Source Code - http://sythe.org/showthread.php?t=1214654

Last edited by Covey : 06-07-2007 at 03:02 AM.
Reply With Quote
  #2  
Old 06-07-2007, 03:10 AM
Covey's Avatar
Creator of EliteSwitch
Ex-Moderator Visual Basic Programmers
 
Join Date: Sep 2005
Location: Fuckin' BAM!
Posts: 4,464
Default Re: Webbrowser troubles.

Figured it out
Code:
Private Sub webMain_Navigating(ByVal sender As Object, ByVal e As System.Windows.Forms.WebBrowserNavigatingEventArgs) Handles webMain.Navigating
        If e.Url.OriginalString = "http://www.runescape.com" Or e.Url.OriginalString = "http://www.runescape.com/" Then
            e.Cancel = True
        End If
    End Sub
__________________
EliteSwitch v4 Source Code - http://sythe.org/showthread.php?t=1214654
Reply With Quote
  #3  
Old 06-08-2007, 02:27 AM
Active Member
 
Join Date: Jan 2007
Posts: 180
Default Re: Webbrowser troubles.

yea, didnt know that one, thanks..
Code:
If e.Url = New Uri("http://www.runescape.com/") Then e.Cancel = True
that works too..got it from flamingidiots i think
__________________
hilo
Reply With Quote
  #4  
Old 06-10-2007, 06:56 AM
Orii
 
Posts: n/a
Default Re: Webbrowser troubles.

Makes sense.
The web browser control doesn't use the string datatype- uses the URI (Uniform Resource Identifier).

'System.Uri is a much safer way of storing URIs. Extensive manipulation of URI related data using plain strings has been shown to cause many security and correctness problems.'

As you have already solved your problem, I'm just explaining it.

Last edited by Orii : 06-10-2007 at 06:57 AM.
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 10:05 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1