Autor Beitrag
mehmeh
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 97

WIN XP
D5 Prof
BeitragVerfasst: Di 07.06.05 09:19 
HI,
hat jemand ne Ahnung wie ich im Programm ein Bitmap als Mauszeiger hinbekomme?
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Di 07.06.05 09:35 
Probiere es mal damit (ist allerdings nicht getestet da Delphi gerade einen Fehler hat mit meinem XP):

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
function CreateCursorFromBitmap(Bitmap: TBitmap; TransparentColor: TColor): TCursor;
begin
 with TImageList.CreateSize(Bitmap.Width, Bitmap.Height) do
  begin
   try
    AllocBy := 1;
    AddMasked(Bitmap, TransparentColor);
    Result:=TCursor.Create;
    try
     GetCursor(0, Result)
    except
     Result.Free;
     raise
    end
   finally
    Free
   end
  end
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
 Form1.Cursor:=CreateCursorFromBitmap(Bitmap, 16777215);
end;
mehmeh Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 97

WIN XP
D5 Prof
BeitragVerfasst: Di 07.06.05 09:58 
hm, funktioniert nicht
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Do 16.06.05 20:21 
Vlt. hilft dir dieser Thread hier. Es aber mit zwischenspeichern des Bildes ;).
>M@steR<
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 288
Erhaltene Danke: 3



BeitragVerfasst: Do 16.06.05 20:39 
Gelöscht


Zuletzt bearbeitet von >M@steR< am Di 17.09.13 01:26, insgesamt 1-mal bearbeitet
Heiko
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3169
Erhaltene Danke: 11



BeitragVerfasst: Do 16.06.05 20:44 
LOL, das tut so als ob da ein Cursorbild wäre, obwohl der Cursor das nicht ist der das Bild hat :wink: .
>M@steR<
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 288
Erhaltene Danke: 3



BeitragVerfasst: Fr 01.07.05 10:17 
Gelöscht