如何冻结Ctrl + C和Ctrl + V [英] How to freeze Ctrl+C and Ctrl+V
本文介绍了如何冻结Ctrl + C和Ctrl + V的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个显示RichTextBox
的程序.
我不希望用户复制RichTextBox
的内容,因此需要冻结Ctrl + C和Ctrl + V.我该怎么办?
I have a program which displays a RichTextBox
.
I do not want the user to copy the content of the RichTextBox
so I need to freeze the Ctrl+C and Ctrl+V. How can I do that?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace test1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
pp();
}
private void pp()
{
string str = "DearSir,\nIn regard to your inqurey about....\nthanks";
richTextBox1.Text=str;
}
}
}
推荐答案
对"C#禁用复制粘贴"的快速Google搜索将 ^ ] .
注意:有多种复制/粘贴方法. Ctrl + C/Ctrl + V,Ctrl + X剪切,Ctrl + Insert/Shift + Insert,以及菜单键可调出上下文菜单(通常具有复制/粘贴子菜单).
A quick Google search on "C# disabling copy paste" will answer that[^].
Note: There are many ways to copy/paste. Ctrl+C/Ctrl+V, Ctrl+X to cut, Ctrl+Insert/Shift+Insert, and the Menu key to bring up the context menu (which usually has copy/paste submenus).
此 [ ^ ]可以帮助您解决问题.
this[^] may help you to sort out your problem.
这篇关于如何冻结Ctrl + C和Ctrl + V的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文