zoukankan      html  css  js  c++  java
  • 屏蔽TextBox控件上的粘贴功能

    实现效果:

      

    知识运用:

      TextBox类的WndProc方法

    实现代码:

        class TextBox1 : TextBox {
            public const int WM_Paset = 0x0302;                 //粘贴消息信息  
            protected override void WndProc(ref Message m)      //重写消息处理方法
            {
                if (m.Msg != WM_Paset)                          //屏蔽粘贴消息信息
                {
                    base.WndProc(ref m);                        //调用基类消息处理方法
                }
            }
        }
    
  • 相关阅读:
    UVA
    UVA
    UVA
    UVA
    NLP介绍
    新建Springboot项目
    添加ssh密钥
    git 错误合集
    Git入门操作
    Hadoop MapReduce
  • 原文地址:https://www.cnblogs.com/feiyucha/p/10145778.html
Copyright © 2011-2022 走看看