I've tried to override WndProc, but no message show up on paste event.
Then I tried to create custom filter and using method PreFilterMessage I was able to catch message with value 257 (KEYUP event), but that's not enough...
Use:
protected override void OnKeyDown(KeyEventArgs e)
{
if (e.KeyCode == Keys.V && e.Modifiers == Keys.Control)
{
MessageBox.Show("Hello world");
}
base.OnKeyDown(e);
}
Make sure your form KeyPreview = true.
您可以通过以下方式做到这一点:
我个人会选择使用菜单选项。