Adblock breaks this site

New StealRS, Will never break :)

Discussion in 'Programming General' started by Stuart, Jan 21, 2008.

  1. Stuart

    Stuart Guru
    Banned

    Joined:
    May 5, 2005
    Posts:
    1,580
    Referrals:
    2
    Sythe Gold:
    10
    New StealRS, Will never break :)

    I made this for cruels.net but thought I would share here aswell.

    It dynamically edits the pages sourcecode so that it just leaves the applet on the webpage and nothing else :)

    Code:
    Private Sub Command1_Click()
    WebBrowser1.Navigate "http://sl1.runescape.com/l1,p0,j1"
    End Sub
    
    Private Sub WebBrowser1_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
    If (URL = "http://www.runescape.com/") Then Cancel = True
    End Sub
    
    Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
    WebBrowser1.Document.body.innerHTML = WebBrowser1.Document.All.Item("app").outerHTML
    WebBrowser1.Width = Val(WebBrowser1.Document.All.Item("app").getAttribute("width")) + 4
    WebBrowser1.Height = Val(WebBrowser1.Document.All.Item("app").getAttribute("height")) + 4
    End Sub
    
     
  2. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    New StealRS, Will never break :)

  3. Stuart

    Stuart Guru
    Banned

    Joined:
    May 5, 2005
    Posts:
    1,580
    Referrals:
    2
    Sythe Gold:
    10
    New StealRS, Will never break :)

    You need to set your form to pixels and not twips in the forms scale mode.
     
  4. Nullware

    Nullware Guru

    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0
    New StealRS, Will never break :)

    Oh boy, you should have known that Covey. D:
     
  5. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    New StealRS, Will never break :)

    Haha, it didn't even cross my mind, but you just times the pixel number by 15 to get the twips number so its aaaaalllllllllllllllllllllll good.
     
  6. 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
    New StealRS, Will never break :)

    Someone mind telling me what the entire point of twips are? They seem like a useless medium of measurement to me.
     
  7. Nullware

    Nullware Guru

    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0
    New StealRS, Will never break :)

    A brainstorm of Microsoft.

    A summation of Microsoft.
     
  8. Covey

    Covey Creator of EliteSwitch
    Retired Sectional Moderator Visual Basic Programmers

    Joined:
    Sep 9, 2005
    Posts:
    4,510
    Referrals:
    9
    Sythe Gold:
    9
    Discord Unique ID:
    807246764155338833
    Discord Username:
    Covey#1816
    New StealRS, Will never break :)

    ^ lol

    --------------------------

    Twips = Screen independant
    Pixels = Screen dependant
     
  9. jdsfighter

    jdsfighter Forum Addict
    Visual Basic Programmers

    Joined:
    Jan 21, 2007
    Posts:
    603
    Referrals:
    0
    Sythe Gold:
    0
    New StealRS, Will never break :)

    You don't always multiply twips by 15 to get the correct pixels. For example my screen has 12 twips per pixel. Just use the built in methods of the screen property to get the correct number. Screen.TwipsPerPixelX Screen.TwipsPerPixelY
     
  10. Melvin

    Melvin Active Member

    Joined:
    Nov 22, 2007
    Posts:
    129
    Referrals:
    1
    Sythe Gold:
    0
    New StealRS, Will never break :)

    Broken..

     
  11. Jazz00006

    Jazz00006 Apprentice
    Visual Basic Programmers

    Joined:
    Aug 26, 2005
    Posts:
    807
    Referrals:
    0
    Sythe Gold:
    0
    New StealRS, Will never break :)

    Thats an error on your side, make sure you can load RS in IE, if you can then you may have something else that needs fixing.

    But that code works 100%
     
  12. Melvin

    Melvin Active Member

    Joined:
    Nov 22, 2007
    Posts:
    129
    Referrals:
    1
    Sythe Gold:
    0
    New StealRS, Will never break :)

    I guess. But i have no problems loading it in IE7.
     
  13. Terrankiller

    Terrankiller Ex-Administrator
    Retired Administrator Visual Basic Programmers

    Joined:
    May 7, 2005
    Posts:
    1,286
    Referrals:
    1
    Sythe Gold:
    1
    New StealRS, Will never break :)

    Maybe you need to get a newer version of Java.
     
  14. Melvin

    Melvin Active Member

    Joined:
    Nov 22, 2007
    Posts:
    129
    Referrals:
    1
    Sythe Gold:
    0
    New StealRS, Will never break :)

    i have newest version.
     
  15. Terrankiller

    Terrankiller Ex-Administrator
    Retired Administrator Visual Basic Programmers

    Joined:
    May 7, 2005
    Posts:
    1,286
    Referrals:
    1
    Sythe Gold:
    1
    New StealRS, Will never break :)

    Maybe you should refer to the technical FAQ which can be found in the FAQ section of their site.
     
  16. asda123

    asda123 Forum Addict
    Banned

    Joined:
    May 13, 2007
    Posts:
    415
    Referrals:
    0
    Sythe Gold:
    0
    New StealRS, Will never break :)

    I lol'd so much at this post :cool:
     
< A Hard Question.. | 1000 to 1,000?! Please post if you know how! >


 
 
Adblock breaks this site