?
Solved

Custom cursors in VB.NET

Posted on 2009-07-05
6
Medium Priority
?
628 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 1000 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

Industry Leaders: 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

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 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