如何让Button点击后不得focus

早上在做一个demo的时候,需要使用Button只展示Preview效果,但不让它得focus。

So easy !

 

   public class MyButton : Button
    {
        
public MyButton()
        {
            
this.SetStyle(ControlStyles.Selectable, false);
        }     
    }

 

posted on 2009-10-19 15:21  西西弗斯  阅读(1032)  评论(0编辑  收藏  举报