Solved

Custom cursors in VB.NET

Posted on 2009-07-05
6
624 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

691 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