Quantcast
Channel: Visual Studio General Questions forum
Viewing all articles
Browse latest Browse all 21115

counting words in an rtfbox

$
0
0
Hey there,

I've made an rtf editor with the semi-functionality of an word counter.:
    Private Sub rtbEditor_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtbEditor.TextChanged        Dim c        c = 0        Dim words() As String = Split(rtbEditor.Text, " ")        Label1.Text = "Totaal aantal woorden: " & CStr((words.Length) - 1)    End Sub



and the words are counted as an space. in my work it produces the number 10382, but in MS word I get the number 10854. how can I solve this?

Viewing all articles
Browse latest Browse all 21115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>