Remove/hide scroll bars on Activex Gui control

Get help with using AutoHotkey and its commands and hotkeys
elmo
Posts: 104
Joined: 09 Oct 2013, 09:08

Remove/hide scroll bars on Activex Gui control

08 Nov 2013, 18:38

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.
User avatar
tank
Posts: 2847
Joined: 28 Sep 2013, 22:15
Facebook: charlie.simmons.7334
Google: ttnnkkrr
GitHub: ttnnkkrr
Location: Irving TX
Contact:

Re: Remove/hide scroll bars on Activex Gui control

08 Nov 2013, 18:58

while ( pane.busy )
sleep, 100
pane.document.body.style.overflow:="hidden"
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
https://www.facebook.com/ahkscript.org
If you have forum suggestions please submit a pull request
Check Out WebWriter
Thanks Tank :thumbup:
elmo
Posts: 104
Joined: 09 Oct 2013, 09:08

Re: Remove/hide scroll bars on Activex Gui control

09 Nov 2013, 15:13

OMG. That works perfectly! Thanks Tank.
elmo
Posts: 104
Joined: 09 Oct 2013, 09:08

Re: Remove/hide scroll bars on Activex Gui control

09 Nov 2013, 16:08

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 ?
dd900
Posts: 82
Joined: 27 Oct 2013, 16:03

Re: Remove/hide scroll bars on Activex Gui control

10 Nov 2013, 12:05

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
elmo
Posts: 104
Joined: 09 Oct 2013, 09:08

Re: Remove/hide scroll bars on Activex Gui control

11 Nov 2013, 11:20

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.
dd900
Posts: 82
Joined: 27 Oct 2013, 16:03

Re: Remove/hide scroll bars on Activex Gui control

11 Nov 2013, 13:01

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.
elmo
Posts: 104
Joined: 09 Oct 2013, 09:08

Re: Remove/hide scroll bars on Activex Gui control

11 Nov 2013, 13:09

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.
DanielToward13
Posts: 74
Joined: 18 May 2017, 10:56

Re: Remove/hide scroll bars on Activex Gui control

18 Dec 2017, 16:03

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.
Joostmee

Re: Remove/hide scroll bars on Activex Gui control

10 Aug 2018, 22:03

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

Return to “Ask For Help”

Who is online

Users browsing this forum: AHKStudent, c7aesa7r, davidonabus, Google [Bot], omar bishr, TheDewd and 27 guests