开发者

Re-activated: How do you disable a DataGridView's keyboard shorcuts?

This issue is same as 2619535.

The given solution is working fine for me if there are no other keyboard events. Unfortunately it is breaking copy/paste events from keyboard. How to ke开发者_运维问答ep Ctrl + c and Ctrl +v functionality intact with this. I am not able to use these shortcuts for copy/paste.

Please assist.

Thanks in advance.

Vijay


Try this code, it works for not copying the data

Private Sub Form1_Deactivate(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Deactivate
    Clipboard.Clear()
End Sub

and you can set the datagridview into readonly properties to avoid pasting data on datagrid

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜