2014-05-08 57 views

回答

0

檢查您是否在RichTextBox1.Text中有任何內容。因爲你的代碼是不是這樣做

If RichTextBox1.Text = "" Then 
    MsgBox("there's no text in RichBox") 
End If 

這IF塊將檢查您是否您的RichTextBox空或不仍然需要找到做過任何匹配檢查this

' Obtain the location of the search string in richTextBox1. 
Dim indexToText As Integer = RichTextBox1.Find(text) 

你想知道查找的多重組合檢查this

+0

咦?請不要發表愚蠢的評論 – user3597926

+0

@ user3597926他不是。如果RichTextBox1.Text = String.IsNullOrWhiteSpace然後.... – Inisheer

0
'--------------------------IF Theres Nothing in it----------------------------- 

    If RichTextBox1.Text = "" Then 
     MsgBox("there's no text in RichBox") 
    End If 

    '--------------------------IF There in it-------------------------------------- 


    If RichTextBox1.Text <>"" Then 
     MsgBox("there's a text in RichBox") 
    End If 
相關問題