| |
|
|
 Jörg Sellmeyer | Eine Schleife, die die Grundfarben anzeigt: KompilierenMarkierenSeparieren
Proc ChangeRGB
Parameters n%
Declare r%,g%,b%
r% = TestBit(n%,0) * 255
g% = TestBit(n%,1) * 255
b% = TestBit(n%,2) * 255
Cls Rgb(R%,G%,B%)
Print "Der Hexwert ist:",Hex$(RGB(R%,G%,B%))," ",n%
Print "Die einzelnen Farben sind:",R%,G%,B%
EndProc
Randomize
Cls Rnd($FFFFFF)
WhileLoop 0,7
WaitInput
ChangeRGB(&Loop)
Wend
Print "Das sind die Grundfarben und deren Mischfarben"
WaitInput
|
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 29.10.2011 ▲ |
|
|
|
|
 | Ich glaube Du könntest statt Case TestBit(n%,0):r% = 255 und clear r%,g%,b% einfach r%=testbit(n%,0)*255 schreiben. |
|
|
| |
|
|
|
 Jörg Sellmeyer | Gute Idee! Hab schon die ganze Zeit überlegt, wie ich das besser hinbekomme. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ...  | 29.10.2011 ▲ |
|
|
|