比如我們想隱藏一段文字然後,觸發謀事件後顯現
我們可以選擇label組件,然後在其text欄打入“文字”
隱藏的方法是,將屬性欄visible屬性從True改爲false,
那麼顯示時就會隱藏了
如果我們需要指定事件讓其顯現,比如按一個按鈕
點開按鈕的方法
在裏面輸入控件名.Visible = true;即可在點擊按鈕後使文字顯現
比如我們想隱藏一段文字然後,觸發謀事件後顯現
我們可以選擇label組件,然後在其text欄打入“文字”
隱藏的方法是,將屬性欄visible屬性從True改爲false,
那麼顯示時就會隱藏了
如果我們需要指定事件讓其顯現,比如按一個按鈕
點開按鈕的方法
在裏面輸入控件名.Visible = true;即可在點擊按鈕後使文字顯現
this.richTextBox2.SelectionStart=this.richTextBox2.Text.Length; this.richTextBox2.ScrollToCaret();
public partial class MyMessageBox : Window { public static void Show(string strErrorInfo) {