Hi. Habe was gefunden. Ich schreibe es nur aus einem Buch ab, aber bisher hat alles was da drin stand funktioniert.
form: picturebox picFVL und commandbutton
code:
declare function CreateSolidBrush ...
declare function DeleteObjext ...
declare function FillRect...
Type RECT
...
End Type
private sub Command1\_Click()
dim hb as long, i as long, rec as rect
with picFVL
.width=3\*255
doevents
rec.botom=.picFVL
rec.top=0
.print " "
for i=0 to 255
hb=createsolidbrush(RGB(i,0,255-i))
rec.left=i rec.Right=(i+1)
fillrect .hdc, rec, hb
deleteobject hb
next
for i=0 to 255
hb=createsolidbrush(RGB(255,i,0))
rec.left=i+255 rec.Right=i+256
fillrect .hdc, rec, hb
deleteobject hb
next
for i=0 to 255
hb=createsolidbrush(RGB(255-i,255,0))
rec.left=i+510 rec.Right=i+511
fillrect .hdc, rec, hb
deleteobject hb
next
end with
end sub
Wenn du statt dessen, z.B. auf einem anderen Control malen willst, mußt du dessen hdc benutzen.
Probiers einfach aus.
Grüße, Holli