منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
[VB.NET] مشكلة في كود color - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183)
+--- الموضوع : [VB.NET] مشكلة في كود color (/showthread.php?tid=20849)



مشكلة في كود color - e-coder - 27-06-17

سلام عليكم
واجهتني مشكلة في الكود ادناه
كيف  اضع colors
في كود
  RichTextBox1.SelectionColor = Color.White



وشكراً



RE: مشكلة في كود color - T44 - 27-06-17

كود :
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



RE: مشكلة في كود color - e-coder - 27-06-17

(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

اين تعديل اخي



RE: مشكلة في كود color - silverlight - 27-06-17

PHP كود :
Dim ABCAs Integer
= (Rnd() * 255)
= (Rnd() * 255)
= (Rnd() * 255)
= (Rnd() * 255)
RichTextBox1.SelectionColor  Color.FrmoArgb(ABCD

أنصحك تستخدم الدالة التالية

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.MaxValueCInt(red) + value))
 
       green CInt(Math.Min(Integer.MaxValueCInt(green) + value))
 
       blue CInt(Math.Min(Integer.MaxValueCInt(blue) + value))
 
       alpha CInt(Math.Min(Integer.MaxValueCInt(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



RE: مشكلة في كود color - e-coder - 27-06-17

النتجية لون واحد فقط