tbx.PreviewMouseUp +=
                    (sender, args) =>
                    {
                        TextBox t = (sender as TextBox);

                        if(t==null) return; 

                        t.SelectAll();

                        ////the condition I met is that after selectall, my screen and mouse are freezed, and the line below can solve it
                        t.ReleaseMouseCapture();        

                    };

arrow
arrow
    全站熱搜

    olivermode 發表在 痞客邦 留言(0) 人氣()