Home | About us | Overview | Softwares - Downloads | Evaluate | Order | Support | old forums | Contact | F.A.Q. | Documentations | Search | Sitemap

Keydowncontrol event

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Keydowncontrol event

Postby RayB on Sat Aug 23, 2008 1:32 pm

Hello,
I am trying to write an application to view pdfs. I have successfully managed to get the viewer to display them, resize them and resize the form it is displayed within. However, I cannot get any of the events to operate - ideally I want to be able to use the keyboard to move through the document. The mouse works fine but the keyboard does not.
I have tried writing handlers for keyboard events outside of the application but while the control has focus they do not work.
Is this feature disabled in the evaluation version?
I have noticed also that the sample VB code does not fully operate either - it does not work with keyboard input or display the mouse coordinates.

I am running Vista with VB.net2008.

Please help.

Thanks.
RayB
 
Posts: 2
Joined: Sat Aug 23, 2008 1:21 pm

Re: Keydowncontrol event

Postby Loïc on Sat Aug 23, 2008 1:58 pm

Hi,

There is some error into the sample.

The comtrol ket events are raised by the KeyDownControl Event. See: http://www.guides.gdpicture.com/v5/gdvi ... ntrol.html

I give you a sample to catch the key arrow press event to move thought the current document:


Code: Select all
Private Sub GdViewer1_KeyDownControl(ByVal sender As Object, ByVal e As AxGdViewerPro4.__GdViewer_KeyDownControlEvent) Handles GdViewer1.KeyDownControl
    Select Case e.keyAscii
            Case 38
                Me.GdViewer1.SetVScrollBarPosition((Me.GdViewer1.GetVScrollBarPosition() - 20))
            Case 40
                Me.GdViewer1.SetVScrollBarPosition((Me.GdViewer1.GetVScrollBarPosition() + 20))
            Case 37
                Me.GdViewer1.SetHScrollBarPosition((Me.GdViewer1.GetHScrollBarPosition() - 20))
            Case 39
                Me.GdViewer1.SetHScrollBarPosition((Me.GdViewer1.GetHScrollBarPosition() + 20))
        End Select
    End Sub



Best regards,

Loïc Carrère
User avatar
Loïc
Site Admin
 
Posts: 1350
Joined: Tue Oct 17, 2006 11:48 pm
Location: France

Re: Keydowncontrol event

Postby RayB on Mon Aug 25, 2008 1:18 pm

Hi Loïc,
Thanks for your speedy response. The code worked fine - thank you.
I have noticed another quirk - I have a pdf document that renders fine but some of the characters are displaced from their original positions such that two letters may overlap slightly making the document hard to read. My guess is that the viewer is substituting a font and not getting the position quite right. Is there a fix for this?

Kind Regards,
Ray.
RayB
 
Posts: 2
Joined: Sat Aug 23, 2008 1:21 pm

Re: Keydowncontrol event

Postby Loïc on Mon Aug 25, 2008 4:34 pm

Hi,

Please, in future report any PDF rendering issue on this topic:

pdf-rendering-issues-t430.html

If you encounter problems in PDF rendering, send us your file at esupport (at) gdpicture (dot) com giving precision on the bad rendering behavior.

Best regards,

Loïc
User avatar
Loïc
Site Admin
 
Posts: 1350
Joined: Tue Oct 17, 2006 11:48 pm
Location: France


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 0 guests