Custom Mouse Pointer


/ Published in: C#
Save to your folder(s)

Changing Mouse Pointer


Copy this code and paste it in your HTML
  1. using System.Runtime.InteropServices;
  2. [DllImport("user32.dll", EntryPoint = "LoadCursorFromFileW", CharSet = CharSet.Unicode)]
  3. public static extern IntPtr LoadCursorFromFile(String str);
  4.  
  5. IntPtr hCursor = LoadCursorFromFile(filename);
  6. this.Cursor = new Cursor(hCursor);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.