Custom Mouse Cursor

  • Thread starter Thread starter Tim
  • Start date Start date
T

Tim

Hi,

I would like to create a custom mouse cursor for my print preview page. I
want to use a bitmap of a magnifiying glass with a plus in it. Pretty
standard stuff.

How do I change the cursor?

I found the code below but I just get the default mouse cursor dragging
around the bitmap which is actually a little behind. I want to replace the
cursor with my own icon.

Thanks
Tim

**ZoomIn is a bitmap.

Graphics g = Graphics.FromImage ( ZoomIn );
IntPtr ptr = ZoomIn.GetHicon();
Cursor c = new Cursor( ptr );
this.Cursor = c;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

creating a custom cursor 1
GetHicon memory leak 3
Mouse Cursor Question 2
Drag-n-Drop 1
mouse cursor 2
Checking cursor type 2
Changing windows mouse cursor 3
WinForms Drag Drop with Custom Image/Cursor 0

Back
Top