need help
-
this is my source that i created Private Sub FontToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontToolStripMenuItem.Click FontDialog1.ShowDialog() RichTextBox1.Font = FontDialog1.Font End Sub Private Sub ColorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ColorToolStripMenuItem.Click ColorDialog1.ShowDialog() RichTextBox1.ForeColor = ColorDialog1.Color End Sub --------------------------------- when i wanna change color and font in richtextbox,all of text in textbox is changed.how to make source code that change color and font in text that we highlight bah10z
bah10z
-
this is my source that i created Private Sub FontToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontToolStripMenuItem.Click FontDialog1.ShowDialog() RichTextBox1.Font = FontDialog1.Font End Sub Private Sub ColorToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ColorToolStripMenuItem.Click ColorDialog1.ShowDialog() RichTextBox1.ForeColor = ColorDialog1.Color End Sub --------------------------------- when i wanna change color and font in richtextbox,all of text in textbox is changed.how to make source code that change color and font in text that we highlight bah10z
bah10z
Hi, a RichTextBox has a lot of properties whose names start with "Selection", those operate on the currently selected content. Read the MSDN documentation for all the details. :)
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.