Hi,

We are developing a C# windows application which scrolls the selected windows automatically by using(hooking) win32 SendMessage() function and later will display the no. of pixels scrolled using GetScrollInfo() function.

The SendMessage() is working properly & is scrolling all windows including IE. But GetScrollInfo() is not working for IE as IE doesnot uses win32 scroll bars. So we are facing the following issues :

(1) When the IE window is being scrolled the SendMessage() will be called infinitely because we are not able to put the condition as we dont know the max scrollable size of the window.
(For other windows we are getting it by 'SCROLLINFO' structure and GetScrollInfo() function.)

(2) We tried with ---- mshtml.dll
- On the occurance of "mshtml.HTMLWindowEvents2_Event.onscroll" event , we are getting
"mshtml.IHTMLElement2.scrolltop" value & it is giving us the present scrollbar top position....when we scroll manually. But if we scroll the IE window by hooking SendMessage() function....IE window will scroll but the 'HTMLWindowEvents2_Event.onscroll' will not be called & 'mshtml.IHTMLElement2.scrolltop' value will not be available.
But while the IE window is being scrolled automatically.....if we click once on scroll bar thumb it gives us the 'mshtml.IHTMLElement2.scrolltop' value....

So we are not finding any why to get scrolled area in IE after completion of automatic scrolling...

Please help us in this regard.

Thank you.

please read the following line:

So we are not finding any why to get scrolled area in IE after completion of automatic scrolling...

as

So we are not getting any way to obtain scrolled area in IE after completion of automatic scrolling...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.