Hi,
you can use the property canvas to change the color of this mousebutton image.
You can try the method FILLRECT or here a little example of a fill i wrote long long ago, it will exchange every white pix within a black border to the color code $FF0000.
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16:
| procedure TForm1.Mach(X,Y:Integer); var I,J:Integer; begin with Image1.Canvas do for J:=1 to 4 do begin case j of 1:Dec(y); 2:begin inc(y);inc(x);end; 3:begin dec(x);inc(y);end; 4:begin dec(y);dec(x);end; end; I:=Pixels[x,y]; if I and $00FFFF>0 then begin Pixels[x,y]:=$02FF0000; Mach(X,Y); end; end; |
oh yes, by the way, you start the procedure from somewhere out of your application with a one point inside the border from the mouse button.
if this all won't work, just go ahead and save different images in different colors and display a new images, this will be for an animation faster anyway.
cu bye und Tschues Markus
Falls jemande ne Uebersetzung wuenscht, einfach email an mich
Ich weiss, rekursiv geht schief, aber ich hoffe einfach mal, dass die Anzahl der Pixel eines Mousbutton nicht so gross sind.
bis denne Der Markus