public class MyTextBox : System.Windows.Forms.TextBox
{
protected override void WndProc(ref Message m)
{
switch(m.Msg)
{
case 0x0302://WM_PASTE
//TODO:Add your code here
break;
default:
break;
}
base.WndProc(ref m);
}
}
然后把你的System.Windows.Forms.TextBox都换成 MyTextBox
{
protected override void WndProc(ref Message m)
{
switch(m.Msg)
{
case 0x0302://WM_PASTE
//TODO:Add your code here
break;
default:
break;
}
base.WndProc(ref m);
}
}
然后把你的System.Windows.Forms.TextBox都换成 MyTextBox
解决方案 »
- 急急急!一点小需求!求简单分析一下!(参与者最少给阳光普照奖)
- Help ,CachingBlock企业库问题
- 如何把String转化为byte数组
- DataGridView单元格合并问题
- 用contextMenustrip实现右键菜单在ActiveX中无法显示出来
- 难:在打开新页面,新加新数据后,返回原页面,刷新DataGrid的问题
- 这样的VC的struct如何写成C#的?
- C# Winform 多线程界面假死
- [求问]在winform中根据不同的条件显示不同的界面,我做了一个简单的测试,可是不能显示界面,代码见内.....
- 请问哪里可以找到关于Duwamish7的详细文档,或者参考资料?
- 高手请进!分数不够可以再加!关于WORD问题
- 为什么出现无法处理的异常?
if(iData.GetDataPresent(DataFormats.Text)) {
string temp=(String)iData.GetData(DataFormats.Text);
//加入你的处理
//... textBox1.Text = (String)iData.GetData(DataFormats.Text);
}
else {
textBox1.Text = "Could not retrieve data off the clipboard.";
}