public System.Drawing.Color SelectionColor { set; get; }
Member of System.Windows.Forms.RichTextBox
Summary:
Gets or sets the text color of the current text selection or insertion point.
Returns:
A System.Drawing.Color that represents the color to apply to the current text selection or to text entered after the insertion point.
myRichTextBox.SelectionColor = myColor
Public Property SelectionColor As Color
Dim instance As RichTextBox
Dim value As Color
value = instance.SelectionColor
instance.SelectionColor = value
Public Sub ChangeMySelectionColor()
Dim colorDialog1 As New ColorDialog()
' Set the initial color of the dialog to the current text color.
colorDialog1.Color = richTextBox1.SelectionColor
' Determine if the user clicked OK in the dialog and that the color has
' changed.
If (colorDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK) _
And Not(colorDialog1.Color.Equals(richTextBox1.SelectionColor)) Then
' Change the selection color to the user specified color.
richTextBox1.SelectionColor = colorDialog1.Color
End If
End Sub
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 6