Viewer: change image rotation through RightClick

Feature Requests for GdPicture.NET.
Post Reply
Imoen
Posts: 6
Joined: Wed Nov 28, 2007 3:13 pm

Viewer: change image rotation through RightClick

Post by Imoen » Wed Dec 05, 2007 9:31 am

Hi,
how may I intercept the event: Right click on viewer and change rotation?
There's PageChange and Zoom_Change events, but I don't how to recognize 'user has changed the rotation' and maybe he wants to change even the image on file, from 'user has changed zoom', nothing happens on file.
Tks

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Wed Dec 05, 2007 12:08 pm

Hi,

To catch the Right Click Event:

Code: Select all

Private Sub GdViewer1_MouseDownControl(Button As Integer, shift As Integer, X As Single, y As Single)
   If Button = 2 Then
      'Write your code here
   End If
End Sub

For the rotation event I will add a new Rotation Event within the next release.

Regards,

Loïc

Imoen
Posts: 6
Joined: Wed Nov 28, 2007 3:13 pm

change image rotation through RightClick

Post by Imoen » Wed Dec 05, 2007 1:51 pm

Tks
Patrizia

fruehaw
Posts: 3
Joined: Mon Dec 31, 2007 5:14 pm

Re: Viewer: change image rotation through RightClick

Post by fruehaw » Mon Dec 31, 2007 6:42 pm

I can catch the event, no problem. But (using VB6) how would I cancel the right-click? My code executes and is immediately followed by the context menu. I want to get rid of that menu (or have the ability to customize it) because I don't want people to have the "Copy to Clipboard" option.

Private Sub oGdViewer_MouseDownControl(Button As Integer, shift As Integer, X As Single, y As Single)
If Button = 2 Then
MsgBox ("click")
'MouseDownControl.Cancel
End If
End Sub

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Viewer: change image rotation through RightClick

Post by Loïc » Sun Jan 06, 2008 9:24 pm

Hi,

You can disable the contextual menu changing the value of the property EnableMenu to False.

Into the next GdPicture V5 release we will add a method to disable specific features from this menu.

Best regards,

Loïc Carrère

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest