开发者

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

开发者 https://www.devze.com 2023-04-11 03:42 出处:网络
This issue is same as 2619535. The given solution is working fine for me if there are no other keyboard events.

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

精彩评论

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