I'm using Delphi 2009, and I can't figure out how to preserve transparency when converting a TBitmap to a TIcon and assigned it as the cursor, its always square and has the white background. Can anyone tell me how I could draw to the bitmaps canvas, and convert the entire thing into a cursor for the mouse, with white being the transparent color?
Teseng
0
Newbie Poster
Recommended Answers
Jump to Post1.Make cursor in cursor editor (hand.cur).
2.Make text file "cursors.rc": HAND CURSOR HAND.CUR
3.Compile: "C:\Program Files\CodeGear\RAD Studio\6.0\bin\brcc32.exe" cursor.rc
4.In program:const crHand = 10; .... implementation {$R Cursor.res} ..... procedure TForm1.Create(Owner: TObject); begin Screen.Cursors[crHand] := LoadCursor(hInstance,'HAND'); end; ... uses: Screen.Cursor := …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.