27-06-17, 05:04 AM
27-06-17, 07:19 AM
كود :
If msg.Type = MessageType.groupchat Then
RichTextBox1.SelectionStart = RichTextBox1.Text.Length
RichTextBox1.SelectionColor = Color.White
RichTextBox1.AppendText(msg.From.Resource)
RichTextBox1.SelectionColor = Color.Red
RichTextBox1.SelectionStart = RichTextBox1.TextLength
RichTextBox1.AppendText(" ➤ " + msg.Body & ChrW(13) & ChrW(10))
RichTextBox1.ScrollToCaret()
End If27-06-17, 02:46 PM
(27-06-17, 07:19 AM)T44 كتب : [ -> ]كود :
If msg.Type = MessageType.groupchat Then
RichTextBox1.SelectionStart = RichTextBox1.Text.Length
RichTextBox1.SelectionColor = Color.White
RichTextBox1.AppendText(msg.From.Resource)
RichTextBox1.SelectionColor = Color.Red
RichTextBox1.SelectionStart = RichTextBox1.TextLength
RichTextBox1.AppendText(" ➤ " + msg.Body & ChrW(13) & ChrW(10))
RichTextBox1.ScrollToCaret()
End If
اين تعديل اخي
27-06-17, 04:56 PM
PHP كود :
Dim A, B, C, D As Integer
A = (Rnd() * 255)
B = (Rnd() * 255)
C = (Rnd() * 255)
D = (Rnd() * 255)
RichTextBox1.SelectionColor = Color.FrmoArgb(A, B, C, D)
أنصحك تستخدم الدالة التالية
PHP كود :
Private Function BuildColor(value As Integer) As Color
Dim red As Integer
Dim green As Integer
Dim blue As Integer
Dim alpha As Integer
red = CInt(Math.Min(Integer.MaxValue, CInt(red) + value))
green = CInt(Math.Min(Integer.MaxValue, CInt(green) + value))
blue = CInt(Math.Min(Integer.MaxValue, CInt(blue) + value))
alpha = CInt(Math.Min(Integer.MaxValue, CInt(alpha) + value))
Return ColorTranslator.FromOle(blue Or green Or red Or alpha)
End Function
طريقة الاستخدام
PHP كود :
Dim value As Integer = 198765
Me.RichTextBox1.SelectionColor = BuildColor(value)
27-06-17, 06:57 PM
النتجية لون واحد فقط