Link scrolling of 2 Web Browser Controls (1 Viewer)

Leyton01

Registered User.
Local time
Tomorrow, 02:28
Joined
Jan 10, 2018
Messages
69
I have 2 Web Browser controls on the one form (webLeft and webRight) which both have a .pdf loaded. I am hoping to link the scrolling between them so that if I mouse or keyboard scroll in one the other scrolls by the same amount.

Is this even possible in Access for Office 365? There appears to be a lack of support in most versions for mouse scrolling.
 

sonic8

AWF VIP
Local time
Today, 17:28
Joined
Oct 27, 2015
Messages
352
I have 2 Web Browser controls on the one form (webLeft and webRight) which both have a .pdf loaded. I am hoping to link the scrolling between them so that if I mouse or keyboard scroll in one the other scrolls by the same amount.


Check out my Sync-ScrollBars-Sample.It is intended to sync the scrollbars of two forms, but maybe it also works with the webbrowser controls.
 

isladogs

CID VIP
Local time
Today, 16:28
Joined
Jan 14, 2017
Messages
14,016
I would agree with that comment.
I haven't yet looked at the sample in Sonic's link but was involved in the other thread by CedarTree. If nothing else, that thread showed how difficult it is to manage the Web browser control scroll bars.

Just out of interest are you using the standard Web browser control or the more powerful ActiveX version?
 

sonic8

AWF VIP
Local time
Today, 17:28
Joined
Oct 27, 2015
Messages
352
I think to actually get to the scroll bars within the control is difficult and needs to be sorted before I possibly implement the above.
Well, you might be right. The webbrowser control has an HWND property, which should be the window handle of the control. But this property does not return any value when the control is used on an Access form.
You still can use the Windows API to get the window handle of the control by looping though all child windows of your form, but it will be difficult to distinguish the two webbrowser controls then.
 

Users who are viewing this thread

Top Bottom