Page 1 of 1

Remove/hide scroll bars on Activex Gui control

Posted: 08 Nov 2013, 18:38
by elmo
Is it possible to display the Activex Gui control without scroll bars ?

The control works great but I will be precisely sizing the called html page(s) so the scrolls bars are not required and they are unattractive.

Code: Select all

Gui , Add , ActiveX , w640 h480 vPane , Shell.Explorer
Gui , Show
Pane.Navigate( "www.auto-hotkey.com" )
return

GuiClose:
ExitApp
I tried the HTMLfile method but that seems not to support javasript.

Thanks for any suggestions.

Re: Remove/hide scroll bars on Activex Gui control

Posted: 08 Nov 2013, 18:58
by tank
while ( pane.busy )
sleep, 100
pane.document.body.style.overflow:="hidden"

Re: Remove/hide scroll bars on Activex Gui control

Posted: 09 Nov 2013, 15:13
by elmo
OMG. That works perfectly! Thanks Tank.

Re: Remove/hide scroll bars on Activex Gui control

Posted: 09 Nov 2013, 16:08
by elmo
Sooo close. Tank, I was hoping to display different web pages using the same control depending on circumstances but I do not know how to address successive instances in the same "Pane".

Code: Select all

; 1st time
Pane.Navigate( "www.ahkscript.org" )
while ( pane.busy )
  sleep, 100
Pane.document.body.style.overflow := "hidden"
; scroll bar(s) are NOT present :-)

; 2nd time
Pane.Navigate( "www.google.com" )
while ( pane.busy )
  sleep, 100
Pane.document.body.style.overflow := "hidden"
; scroll bar(s) return :-(
Assuming "Pane" is a com object of some sort, is there an "incrementation" required ? Is this even possible ?

Re: Remove/hide scroll bars on Activex Gui control

Posted: 10 Nov 2013, 12:05
by dd900
Try using Shell.Explorer2 instead of Shell.Explorer.

Code: Select all

Gui , Add , ActiveX , w640 h480 vPane , Shell.Explorer2
Gui , Show
Pane.Navigate( "www.autohotkey.com" )
while Pane.ReadyState != 4
	Sleep 10
Pane.Document.Body.Style.Overflow := "Hidden"
Sleep 5000
Pane.Navigate( "www.google.com" )
while Pane.ReadyState != 4
	Sleep 10
Pane.Document.Body.Style.Overflow := "Hidden"
return

GuiClose:
ExitApp

Re: Remove/hide scroll bars on Activex Gui control

Posted: 11 Nov 2013, 11:20
by elmo
Thanks dd900. That worked!

I looked around but could not figure out the difference between shell.explorer and shell.explorer2.

Although this issue is solved, may I trouble you for some insight?

Thanks again.

Re: Remove/hide scroll bars on Activex Gui control

Posted: 11 Nov 2013, 13:01
by dd900
Honestly I don't know. MSDN doesn't directly mention shell.explorer or shell.explorer2 in the documentation that I can find. At least none that explain the difference between the two. I just knew that it existed and shell.explorer gives me fits on Win 8 so I gave it a try and it worked for me, so I figured it might work for you. Hopefully someone with more knowledge on the subject comes across this thread, so they can give an explanation.

Re: Remove/hide scroll bars on Activex Gui control

Posted: 11 Nov 2013, 13:09
by elmo
Thank you for your refinement to Tank's solution and this timely response. I feel better because I could not find anything of consequence either! Curious that.

Re: Remove/hide scroll bars on Activex Gui control

Posted: 18 Dec 2017, 16:03
by DanielToward13
I know this is an old topic but it might still be useful. Injecting the following CSS code -ms-overflow-style: none; will force IE (Internet Explorer and Microsoft Edge) to hide the scrollbar, although the element can still be scrolled if the element's content overflows. You can also use -ms-overflow-style: -ms-autohiding-scrollbar; for auto-hiding the scrollbar. You can read more here.

Re: Remove/hide scroll bars on Activex Gui control

Posted: 10 Aug 2018, 22:03
by Joostmee
I know this is a very old post but thought I might help someone who happens to come across this.

I have no idea WHY this works, but if you add an extra comma before Shell.Explorer, your scrollbars will be gone. At least they are for me.

So your first line will look more like:

Code: Select all

Gui , Add , ActiveX , w640 h480 vPane ,, Shell.Explorer