Solved

Custom cursors in VB.NET

Posted on 2009-07-05
6
615 Views
Last Modified: 2012-05-07
Hi experts

Please help me to make 6 or so custom cursors (.CUR files already created) available in my VB.NET program.

BTW, Im posting from England where it is unusually hot. What about you guys ?

TIA, Patrick
0
Comment
Question by:patrick_otter
  • 2
  • 2
6 Comments
 
LVL 4

Expert Comment

by:stevepicks
ID: 24780528
0
 

Author Comment

by:patrick_otter
ID: 24782992
Thanks for trying but the solution to which you linked was about setting the system cursors. I want to change cursors within an application.

Patrick

0
 
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 24783284
Hi Patrick,

Use something like this to load your cursors from a file....

        Dim cur As New Cursor("C:\Path\Filename.cur")
        Me.Cursor = cur

BTW, I'm in northern Australia, so hot isn't that unusual :)

Wayne
0
 

Author Comment

by:patrick_otter
ID: 24825382
Thanks Wayne

Fine Wayne: that will get my program showing the cursors but I'm developing something I hope to market as shareware. Because of this, I don't really want to ship the cursors in separate files.

AIUI, it's possible to stick them in a resource and then access them from there. My probl;em is that I don't know how to do that.

I've heard about the heat in Northen Oz so ours in UK is nothing by comparision.

stay cool, man :-) regards, Patrick
0
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 250 total points
ID: 24828390
To load a cursor from your resources, use something like this....

        Dim ms As New IO.MemoryStream(My.Resources.MyCursor)
        Dim cur As New Cursor(ms)

...where MyCursor is the cursor file added to the Resources tab in Project Properties.

Wayne
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question