I build an application with the functionality to see the GDViewer or see the ThumbnailViewer.
If the user presses CTRL + A the view switch between the controls, so far so good, but if I select a Page on the ThumbnailViewer this behaviour don’t work anymore because the ThumbnailViewer or the selected item catches this keyinput.
If I want the behaviour I intend, I have to click on the GDViewer control.
I tried to override the KeyInput from the ThumbnailViewer but it didn’t work and I tried to set the focus on the GdViewer manually with the method Focus() after I’ve selected a page in the ThumbnailViewer but this didn’t work either.
Do you have any suggestion for my problem?
Oh I almost forgot to say, I turned the multiselection possibility off, so it is false. Well if I set this option to true all pages in the ThumbnailViewer will be selected. So this works properly.
It is considered as a bad practice to deflect the Windows standard hotkeys, CTRL+A is meant to "select all" the same way CTRL+C is for copy, CTRL+V for paste, etc...
Your best option would be to try through the RegisterHotKey function : https://msdn.microsoft.com/en-us/librar ... 2147217396
Here is a blog article showing how to use it http://www.fluxbytes.com/csharp/how-to- ... tion-in-c/
thanks for your help. I will have a look into it.
So I worked on it and it really works.
I had to change a few things to make it work under C# WPF, for example
the WPF Key-Enum (A = 44) has an other order for its ordinals than the Winforms Keys-Enum (A = 65) and I had to register my own WinProc Method because this do not exists in a WPF Windows class.
So many thanks again Cedric for your help and inspiring links.
Who is online
Users browsing this forum: No registered users and 1 guest