Loading...

Customized Right Click Menu

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Customized Right Click Menu

Postby riona26 » Fri Dec 12, 2008 6:36 am

Hi there,

I've disabled the right click menu of GDViewer by using "gdViewer1.EnableMenu = False", and I customerized my own right click menu.
Then I got a very funny issue...
my menu items activate commands like "gdImaging1.RotateAngle(90)", "gdImaging1.RotateAngle(-90)", "gdViewer1.ZoomIN()" and "gdViewer1.ZoomOut()".

For the first time, i click on the item for gdImaging1.RotateAngle(90), the image displayed in GDViewer rotated 90C.
The I click the same item again, the image rotated 90C for 2 times (i can see the viewer flashed for 2 rotations)... So my image is rotated for 270C...
When i did the 8th click, gdViewer flashed for 8 times and i saw the image rotated in 90C for 8 times...

The above issue happens when i click any commands list above in any orders...

I'm testing gdpicturepro5.ocx v5.8.0.0 on vb 2008.

Please advise for solutions.

Thanks & Regards,
Riona
riona26
 
Posts: 4
Joined: Fri Dec 12, 2008 6:15 am

Re: Customized Right Click Menu

Postby Loïc » Fri Dec 12, 2008 10:39 am

Hi Riona,

Strange behavior. :|

Could you give me a code snippet to reproduce this problem ? Also, send me the image you are using at esupport (at) gdpicture (dot) com.

With best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Customized Right Click Menu

Postby riona26 » Tue Dec 23, 2008 2:53 am

hi there,

i have sent you an email with program code and image file on 15th Decemeber, any news?

regards,
riona
riona26
 
Posts: 4
Joined: Fri Dec 12, 2008 6:15 am

Re: Customized Right Click Menu

Postby Loïc » Tue Dec 23, 2008 4:30 pm

Hi Riona,

You sent me this following code:


Code: Select all
Private Sub gdViewer1_ClickControl(ByVal sender As Object, ByVal e As System.EventArgs) Handles gdViewer1.ClickControl
        If gdViewer1.PageCount = 0 Then Exit Sub
        mnu6045.Show(MousePosition.X, MousePosition.Y)
        AddHandler mnu6046.Click, AddressOf mnu6046_Click
        AddHandler mnu6047.Click, AddressOf mnu6047_Click
        AddHandler mnu6048.Click, AddressOf mnu6048_Click
        AddHandler mnu6049.Click, AddressOf mnu6049_Click
End Sub

Sub mnu6047_Click()
        gdImaging1.GetPictureFromGdPictureImage(gdViewer1.GetNativeImage)
        gdImaging1.RotateAngle(-90)
        Select Case gScannerInfo.sFileType
            Case vbcPDFExt
                gdImaging1.SaveAsPDF(lblDocName.Text)
            Case vbcJPGExt
                gdImaging1.SaveAsJPEG(lblDocName.Text)
            Case vbcTIFFExt
                gdImaging1.SaveAsTIFF(lblDocName.Text)
        End Select
        gdViewer1.DisplayFromFile(lblDocName.Text)
End Sub

Sub mnu6046_Click()
        gdImaging1.GetPictureFromGdPictureImage(gdViewer1.GetNativeImage)
        gdImaging1.RotateAngle(90)
        Select Case gScannerInfo.sFileType
            Case vbcPDFExt
                gdImaging1.SaveAsPDF(lblDocName.Text)
            Case vbcJPGExt
                gdImaging1.SaveAsJPEG(lblDocName.Text)
            Case vbcTIFFExt
                gdImaging1.SaveAsTIFF(lblDocName.Text)
        End Select
        gdViewer1.DisplayFromFile(lblDocName.Text)
End Sub

Sub mnu6048_Click()
        gdViewer1.ZoomIN()
End Sub

Sub mnu6049_Click()
        gdViewer1.ZoomOUT()
End Sub


I don't know what your are trying to do exactly but in the gdViewer1_ClickControl event your are adding 4 event handler to 4 other events. Your error is here. You should add your event handler in the load event of the form for example.

Best regards,

Loîc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Customized Right Click Menu

Postby riona26 » Wed Dec 24, 2008 2:56 am

hi loic,

as i had no problem on other imaging tool even i used the wrong way to add handler, i dont aware my problem. thanks for your advice.

but i have a little comment on improving your service...
i had asked the question for a week, therefore i came back and asked for news. then you told me u didnt know what i was doing. why dont u ask... kinda disappointing service level...
actually i'm happy with your response time in other questions, as i have asked you a few questions and you provide a new version of gdpicturepro5.ocx for me in a few hours during this summer holiday.

thanks & regards,
Riona
riona26
 
Posts: 4
Joined: Fri Dec 12, 2008 6:15 am

Re: Customized Right Click Menu

Postby Loïc » Wed Dec 24, 2008 9:54 am

Hi Riona,

Thank you for your feedback. I know these last months support are not what it was. But there is a reason :) We are working hard on a new product line which will be released on 1/1/2009: GdPicture.NET This take the major part of free time. Support should be better for 2009 ;)

Best regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest