wpf animated cursor

A

Andy O'Neill

I'm trying to use an animated cursor in a WPF application.
Something is going wrong and I can't work it out.
I wonder if anyone has come across this previously.


I copy stopwtch.ani to the project folder.
Add it to the project.
Set it's build property to resource

Use the following code snippet:
StreamResourceInfo sri = Application.GetResourceStream
(new Uri("stopwtch.ani", UriKind.Relative));
Cursor customCursor = new Cursor(sri.Stream);
this.Cursor = customCursor;

error
Cannot locate resource 'stopwtch.ani'.


Thanks in anticipation.
 

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

Top