تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[VB.NET] مشكلة في كود color
#4
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
الرد }}}
تم الشكر بواسطة: e-coder , e-coder


الردود في هذا الموضوع
مشكلة في كود color - بواسطة e-coder - 27-06-17, 05:04 AM
RE: مشكلة في كود color - بواسطة T44 - 27-06-17, 07:19 AM
RE: مشكلة في كود color - بواسطة e-coder - 27-06-17, 02:46 PM
RE: مشكلة في كود color - بواسطة silverlight - 27-06-17, 04:56 PM
RE: مشكلة في كود color - بواسطة e-coder - 27-06-17, 06:57 PM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم