Posted By

saqibmajeed on 06/30/11


Tagged

mouse change pointer


Versions (?)

Custom Mouse Pointer


 / Published in: C#
 

Changing Mouse Pointer

  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  

You need to login to post a comment.