Cita:
Empezado por tcp_ip_es
pon el código y vemos si te podemos ayudar...
|
Este es el código que estoy utilizando:
Código:
var
Bitmap, BitmapMask: TBitmap;
x, y: Integer;
begin
// Crear
Bitmap := TBitmap.Create;
BitmapMask := TBitmap.Create;
// proteccion
try
// Cargar la imagen
Bitmap.Assign(Image1.Picture.Bitmap);
// Asignar la imagen
BitmapMask.Assign(Bitmap);
// Si suponemos como color transparente el clFuchsia, lo sustituimos por
// otro para la transparencia
for y:= 0 to 31 do begin
for x:= 0 to 31 do begin
if Bitmap.Canvas.Pixels[x, y] = clFuchsia then begin
Bitmap.Canvas.Pixels[x, y]:= clBlack;
end;
end;
end;
// Crear el icono del cursor
with iconInfo do begin
fIcon:= True;
xHotspot := (Bitmap.Width div 4);
yHotspot := (Bitmap.Height div 3);
hbmMask:= BitmapMask.MaskHandle;
hbmColor:= Bitmap.Handle;
end;
// Asignar el icono
Screen.Cursors[1] := CreateIconIndirect(iconInfo);
Self.Cursor := 1;
//En este punto abro la consulta y hasta que no acaba
// de ejecutarse no aparece el cursor cambiado
Query1.Open;
// Liberar
finally
BitmapMask.Free;
Bitmap.Free;
end;
A ver si me podéis ayudar, gracias