Hi Martjin,
Here is a short tutorial on how to create and utilize a custom Cursor from
within VS 2005:
1. In VS 2005 (and earlier versions of VS.NET as well, AFAIK) you can create a
cursor by adding a new file to a project and selecting Cursor as the file
type. Create one now and name it, "MyFirstCursor.cur". There is a hot-spot
tool that you can use when designing your cursor. The hot-spot tool button
contains an icon of a solid black arrow pointing to what appears to be a
spark. Use the tool to set the pixel that will be the actual coordinates used
for mouse events.
2. Add a resource file to the project and name it "MyCursors.resx".
3. With the "MyCursors.resx" file open in the designer, select from the
drop-down the view type named, "Files". (The default will probably be
"Strings").
4. Open the Solution Explorer and drag the "MyFirstCursor.cur" file into the
white-space of the "MyCursors.resx" designer.
The .resx file will be compiled into the project's assembly as an embedded
resource. The embedded resource will contain the contents of the
"MyFirstCursor.cur" file. The "MyFirstCursor.cur" file itself is only project
content and will not be contained in the assembly.
5. Use the following code to create a Cursor object for your custom cursor,
"MyFirstCursor.cur":
Cursor cursor;
using (System.IO.MemoryStream stream =
new System.IO.MemoryStream(MyCursors.MyFirstCursor))
{
cursor = new Cursor(stream);
}
6. Set the Form's Cursor:
form.Cursor = cursor;
--
Dave Sexton
"Martijn Mulder" <i@mwrote in message
news:45***********************@news.wanadoo.nl...
>I am looking for a tutorial for creating and using custom cursors in a .NET
application