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

RuneScape Client Browser Resizing + no ads

Supah Fly

Active Member

Banned
Joined
Aug 22, 2007
Sythe Gold
0
Messages
202
Location
your face
Source:
http://www.multiupload.com/1MUYOKAMNZ

Ads are shown if the browser is big enough to show them:
ss20100528125445.jpg


Ads are hidden if the browser is too small:
ss20100528125436.png


Right when you load it:
ss20100528125405.jpg


If you get an error like licenses.lx or something is missing just go into the properties folder and remove it.

Just download my source and it will work fine, if you try and copy paste into your project I'm not going to help you.

Code:
        private void Form1_Resize(object sender, EventArgs e)
        {
            panel1.Height = this.Height - 44; // calculate the main left panel's height
            panel1.Width = this.Width - panel2.Width - 30; // calculate the correct width
            panel3.Height = panel1.Height - panel4.Height - 6; // calculate the right height for the runescape panel
            panel2.Left = panel1.Width + 3; // just move this to the right location
            panel2.Height = this.Height - 44; // resize this to go with the whole client's height

            try
            {
                if (webBrowser1.Url.AbsoluteUri.Contains("world") && webBrowser1.Url.AbsoluteUri.Contains("runescape.com"))
                {
                    webBrowser1.Document.Window.ScrollTo(0, 128); // stupid ads, scrolls down if it needs to. it won't scroll if there is enough room for ads
                }
            }
            catch (Exception ex)
            {
                // lol errorzorz, the client doesn't exist yet!!
            }
        }

        private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
        {
            webBrowser1.Document.Body.Style = "border-style: none; border-width: 0px;"; // get rid of border around webbrowser1

            if (webBrowser1.Url.AbsoluteUri.Contains("game.ws") && webBrowser1.Url.AbsoluteUri.Contains("runescape.com"))
            {
                webBrowser1.ScrollBarsEnabled = false; // we will scroll automatically
                HtmlElement he = webBrowser1.Document.GetElementsByTagName("frame")[0]; // when you load game.ws it makes a frame with the world page in it
                webBrowser1.Navigate(he.GetAttribute("src")); // go to the real url, then we can get rid of the borders and stuff
            }
            else if (webBrowser1.Url.AbsoluteUri.Contains("world") && webBrowser1.Url.AbsoluteUri.Contains("runescape.com"))
            {
                webBrowser1.ScrollBarsEnabled = false; // we will scroll automatically
                webBrowser1.Document.Window.ScrollTo(0, 128); // stupid ads
            }
            else
            {
                webBrowser1.ScrollBarsEnabled = true; // re-enable the scroll bars since we aren't viewing the game page anymore
            }
        }

        private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
        {
            if (webBrowser1.Url.AbsoluteUri.Contains("game.ws") && webBrowser1.Url.AbsoluteUri.Contains("runescape.com"))
            {
                webBrowser1.ScrollBarsEnabled = false; // we will scroll automatically
                HtmlElement he = webBrowser1.Document.GetElementsByTagName("frame")[0]; // when you load game.ws it makes a frame with the world page in it
                webBrowser1.Navigate(he.GetAttribute("src")); // go to the real url, then we can get rid of the borders and stuff
            }
            else if (webBrowser1.Url.AbsoluteUri.Contains("world") && webBrowser1.Url.AbsoluteUri.Contains("runescape.com"))
            {
                webBrowser1.ScrollBarsEnabled = false; // we will scroll automatically
                webBrowser1.Document.Window.ScrollTo(0, 128); // stupid ads
            }
            else
            {
                webBrowser1.ScrollBarsEnabled = true; // re-enable the scroll bars since we aren't viewing the game page anymore
            }
        }
 
Lawrence
Pokémon Trainer
Doge
Extreme Homosex
Two Factor Authentication User
UWotM8?
Look's nice, does it work at school haha xD
 
You could actually probably make a runescape client that works at school because there is a version of runescape that doesn't use java(?)

ss20100528162430.jpg
 
^I found that funny. No, regardless of weather you are using the signed/unsigned client, it's a java applet.
 
You could actually probably make a runescape client that works at school because there is a version of runescape that doesn't use java(?)

ss20100528162430.jpg
That's using MS Java (comes bundled with windows XP, I believe)
 
The browser has ads regardless. It'll only show no ads if you're a member, or you're using a different kind of client. (i.e some sort of bot)
 
Runescape Gamblingrunescape gambling
Back
Top