Solved

Custom cursors in VB.NET

Posted on 2009-07-05
6
609 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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)…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now