Simulate key strokes to trigger shortcut
Windows Forms
2
Posts
2
Posters
2
Views
1
Watching
-
I want to trigger a behavior for which a third party component provides a keyboard shortcut. The user can trigger this behavior with CTRL+SHIFT+V, but I want to do it automatically in certain circumstances. Any ideas?
I am not sure it is a great idea, but you can do keystrokes with the SendKeys. I think a better solution would be when you want to call the same method if you can see the event that is getting called I would try to call it. Or if there is a button that can be clicked you can always do button.PerformClick() Hope that helps. Ben