
有什么建议如何检测ToolStripTextBox上的剪贴板粘贴?
解决方法 似乎无法触及ToolStripTextBox中的WndProc.我出于好奇搜索了一下,然后遇到了答案 – https://stackoverflow.com/a/4688745/168719如果使用ToolStripControlHost不是一个选项,那么对于需要自定义处理WndProc的场景,还有其他聪明的解决方案:
http://bytes.com/topic/c-sharp/answers/279168-toolstriptextbox-right-click
总结Nicholas Paldino [.NET/C# MVP]
I just noticed that. In order to get around this,you can get the hosted TextBox by calling the TextBox property. Then,you should be able to create a class derived from NativeWindow which overrIDes the WndProc method to ignore the context menu message [or to intercept WM_PASTE,obvIoUsly…] When you get the textBox property,get the handle,and assign the handle to your overrIDden NativeWindow class.
以上是内存溢出为你收集整理的在ToolStripTextBox(C#)中检测剪贴板中的粘贴全部内容,希望文章能够帮你解决在ToolStripTextBox(C#)中检测剪贴板中的粘贴所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)