$ cat "

C#: Creating a Cursor from a Resource

"

A simple way to use custom cursor icons in .NET applications is to include the .cur file in the project resources (project properties -> resources -> add resource from file).

A cursor can then be created like so:



Cursor cursor = new Cursor(new System.IO.MemoryStream(
Properties.Resources.MyCursorName));

Written by Erik Öjebo 2009-06-02 12:28

    Comments