Page 1 of 1

Shortcut to rotate image

Posted: Fri Sep 02, 2011 2:12 pm
by mange71
I have a form with both a imageviewer and a thumbnailviewer, in the form i have buttons for rotate the image, connected to the button there is shortcuts (Ctrl+Left Arrow, Ctrl+Right Arrow). When i focus in the thumbnailviewer, i cant get the shortcuts to work... The only thing that happens is that the thumbnailviewer select the previous or the next thumbnail.

Is it possible to "connect" a shortcut "Ctrl + Left Arrow" or "Ctrl + Right Arrow" to rotate image in imageviewer even if the focus is on the thumbnailviewer wich seems to consume the arrows-keys to go to next or previous thumbnail, overriding the default behaviour of the arrow keys?

/Magnus

Re: Shortcut to rotate image

Posted: Mon Sep 05, 2011 2:36 pm
by Alex
Hello Magnus,

Thumbnail viewer navigates thumbnails like Explorer.

You need do the following steps if you want to change the behavior of the thumbnail viewer:
  • Create a new class derived from the ThumbnailViewer class
  • Override the ProcessCmdKey method
  • Use new class instead of the ThumbnailViewer class
Best regards, Alexander