Jump to content

Recommended Posts

Posted (edited)

#include <IE.au3>

$WinMain = GUICreate("test", 720, 550, (@DesktopWidth - 720) / 2, (@DesktopHeight - 650) / 2)

$oIE = ObjCreate("Shell.Explorer.2")

$GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, 720, 500)

GUISetState()

_IENavigate($oIE, "http://www.autoitscript.com")

_IELoadWait($oIE)

$oIE.document.body.scroll = "no"

While 1

WEnd

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Existence of scroll bar

if _IENavigate($oIE, "http://www.google.com") There is no scroll bar

The same code, different URLs, the result is different

How to make all web pages scroll bar does not exist in?

Looking forward to predecessors pointing, first to thank.

Edited by xiaoxiami
Posted

The reason there is no scrollbar on www.google.com is because the google.com fits the frame you're putting it in.

IE8 (not sure about previous versions) do not honor the BODY SCROLL tag anymore, because it is deprecated.

I'm not sure how to fix it, but at least you know what to look for now ...

Posted

I know the reason now,it can not simply create a webbrowser without the scroll bar.

Thank you all the same!

Feeling a lot of programming languages in support of webbrowser are not very good.

Posted

Through access to information I have found, this problem can be resolved with iframe, if the page you visit can not be called by iframe, this method will be failure, so it's not the best way for this problem. Waiting to see if there is a better way to solve it.

#include <IE.au3>

$WinMain = GUICreate("test", 720, 550, (@DesktopWidth - 720) / 2, (@DesktopHeight - 650) / 2)

$oIE = _IECreateEmbedded()

$web="http://www.autoitscript.com"

GUICtrlCreateObj($oIE, 10, 10, 700, 530)

GUISetState()

$oIE.navigate("about:blank")

$oIE.document.body.style.border="0"

$oIE.document.write("<body style='border:0;margin:0px'><iframe scrolling=no frameborder=0 src =" & $web & " width=100% height=100%></iframe></body>")

$oIE.refresh

$oIE.document.body.scroll = "no"

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...