Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

VS 2010 No error showing up?

$
0
0
Code:

RichTextBox2.Text = RichTextBox1.Text
        Me.Controls.Add(RichTextBox2)
        RichTextBox2.Dock = DockStyle.Fill
        RichTextBox1.SendToBack()
        RichTextBox2.BringToFront()
        RichTextBox2.Dock = DockStyle.Fill
        Timer1.Enabled = True
        RichTextBox1.SelectionStart = 0
        Do Until RichTextBox1.SelectionStart = RichTextBox2.Text.Length - 1
            If Not RichTextBox1.SelectionStart = 0 Then
                RichTextBox1.SelectionStart = RichTextBox1.SelectionStart + 1
                Do Until RichTextBox1.SelectedText.EndsWith(" ")
                    RichTextBox1.SelectionLength = RichTextBox1.SelectionLength + 1
                Loop
                RichTextBox1.SelectionFont = New Font(RichTextBox1.SelectionFont.FontFamily.Name.ToString, RichTextBox1.SelectionFont.Size + 20)
                RichTextBox1.SelectionStart = RichTextBox1.SelectionStart + RichTextBox1.SelectionLength
                RichTextBox1.SelectionLength = 0
            Else
                Do Until RichTextBox1.SelectedText.EndsWith(" ")
                    RichTextBox1.SelectionLength = RichTextBox1.SelectionLength + 1
                Loop
                RichTextBox1.SelectionFont = New Font(RichTextBox1.SelectionFont.FontFamily.Name.ToString, RichTextBox1.SelectionFont.Size + 20)
                RichTextBox1.SelectionStart = RichTextBox1.SelectionStart + RichTextBox1.SelectionLength
                RichTextBox1.SelectionLength = 0
            End If
        Loop
        Timer1.Enabled = False

That is my VB.net code that selects each word and makes the word bigger. I am still working on the code, so please do not reply about anything other than my question.
Here is my question: How come when I press Button4 (with this code inside its CLICK event handler), it looks like it throws an error (it freezes, the button's animation is frozen), but nothing happens. No error comes up. Thanks in advance! :)

Viewing all articles
Browse latest Browse all 27329

Trending Articles



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