vb.net - VB 2010 Express Webrowser Scrollto -
i load pdf document webrowser:
webbrowser1.navigate("f:/documents/headache.pdf") using button want scroll position someway down browser:
me.webbrowser1.document.window.scrollto(0, 50) on running code error "nullreferenceexception unhandled". have searched high , low solution find says code should work (ie worked others). hope 1 can me.
so. after little more research , head scratching, webbrowser1.navigate not set webbrowser1.document pdf. (of course code works no problem html.)
my soultion: replaced webrowser axacropdf1 control , used
me.axacropdf1.setviewscroll("fith", 50) to scroll through document.
Comments
Post a Comment