Scroll into a Adobe Reader using buttons c#
-
I Have Created a Simple form in which i have added Adobe Reader from toolbox using steps 1. right click in toolbox - Choose Items 2. choose COM Components tab and there "Adobe PDF Reader" 3. Now Drag&Drop the Adobe PDF Reader Control into an UserControl I have successfully added this, opened up a pdf file also. Now it automatically provides with vertical scrollbars for scrolling through the pdf document. What i want to achieve is instead of using the given scrollbars or mouse to scroll, i want to use a button to scroll scroll the pdf, So there will be two buttons, One for Scroll Up And the other for scroll down. I have gone through many forums, pages, etc. Havnt found anythn that i could use. I have Tried Simulating key presses with
SendKeys.Send("{DOWN}");
But as i press the button, the focus is lost on the adobe reader so it doesnt work Pls help me... I have spent almost half a day searchin for a solution
-
I Have Created a Simple form in which i have added Adobe Reader from toolbox using steps 1. right click in toolbox - Choose Items 2. choose COM Components tab and there "Adobe PDF Reader" 3. Now Drag&Drop the Adobe PDF Reader Control into an UserControl I have successfully added this, opened up a pdf file also. Now it automatically provides with vertical scrollbars for scrolling through the pdf document. What i want to achieve is instead of using the given scrollbars or mouse to scroll, i want to use a button to scroll scroll the pdf, So there will be two buttons, One for Scroll Up And the other for scroll down. I have gone through many forums, pages, etc. Havnt found anythn that i could use. I have Tried Simulating key presses with
SendKeys.Send("{DOWN}");
But as i press the button, the focus is lost on the adobe reader so it doesnt work Pls help me... I have spent almost half a day searchin for a solution
You might try using this with SendKeys: "+^H" ... see what happens. [^].
“I'm an artist: it's self evident that word implies looking for something all the time without ever finding it in full. It is the opposite of saying : 'I know all about it. I've already found it.' As far as I'm concerned, the word means: 'I am looking. I am hunting for it. I am deeply involved.'” Vincent Van Gogh
-
You might try using this with SendKeys: "+^H" ... see what happens. [^].
“I'm an artist: it's self evident that word implies looking for something all the time without ever finding it in full. It is the opposite of saying : 'I know all about it. I've already found it.' As far as I'm concerned, the word means: 'I am looking. I am hunting for it. I am deeply involved.'” Vincent Van Gogh
I tried it, but it did nothing, What was it supposed to do???
-
I tried it, but it did nothing, What was it supposed to do???
Might worth trying: Try sending a
WM_VSCROLL
message, usingSendMessage()
(via PInvoke) to the PDF Reader's Handle, when the button is clicked. Should look like this:SendMessage(adobePDFReaderHandle, WM_VSCROLL, (IntPtr)1, IntPtr.Zero); // this should scroll down
Hopefully the handle of the control is provided...if not, you'll have to search it... Otherwise, try restoring the focus to the Adobe PDF Reader Control before sending the key combination.