Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 |
Public Sub Form_Load() Dim orange As Long = RGB(255, 163, 0) Dim black As Long = RGB(0, 0, 0) Text1.BackColor = black Text1.ForeColor = orange ' Text1.Parent.setCaretColor(orange) Text1.Parent.setCaretColor(Not Orange) End Sub |
Jabaco Source |
|
1 2 3 4 5 |
Dim orangeColor As Color = Color.orange Dim orangeRGB As Long = ColortoRGB(orangeColor) Text1.BackColor = vbBlack Text1.ForeColor = orangeRGB Text1.Parent.setCaretColor(RGBtoColor(NotRGB(OrangeRGB))) |
Jabaco Source |
|
1 2 3 |
Function NotRGB(col As Long) As Long NotRGB = (&HFFFFFF And (Not col)) End Function |
Source code |
|
1 2 3 |
public static long NotRGB(long RGB) { return (long)(0xFFFFFFL & (~ RGB)) } |
Intermediate
Date of registration: Jan 1st 2009
Location: Hanover, Germany
Occupation: Software Engineer
Hobbies: Hilbert Curves
Jabaco Source |
|
1 2 3 4 5 |
Public Sub Form_Load() text1.Parent.setForeground color.orange text1.Parent.setBackground color.black Text1.Parent.setCaretColor color.orange End Sub |
Source code |
|
1 |
text1.ForeColor = color.orange |
Source code |
|
1 |
Text1.$ForeColor(Double.valueOf(Color.orange.toString()).longValue()); |
Quoted
Vielleicht wäre es besser, keine automatische Konversion von Objekten auf "Long" zu versuchen.
Jabaco Source |
|
1 |
Option Strict On |