Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

chang pointer in windows app

Posted on 2009-05-15
11
Medium Priority
?
257 Views
Last Modified: 2013-12-17
I am working on a windows app and I want to change the pointer however I cant find where to add new Cursor. I have seen in the properties But I dont know where to add new ones to the VS database so it can be slectable other than the standard choices VS gives you. Does anyone have any ideas??
0
Comment
Question by:HawaiiDragon
[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
  • 6
  • 5
11 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 24399284
The simplest way:

Go to Project->Add New Item->General->Cursor File

Then draw your cursor. In Solution Explorer, select you new cursor file and hit F4 to bring up Properties Window. Set the "Build Action" to "Content" and "Copy to Output" to either of the copy options. Then in your code, do something like the following:
this.Cursor = new Cursor("Cursor1.cur");  // Where Cursor1.cur is the name of the new cursor file you created

Open in new window

0
 

Author Comment

by:HawaiiDragon
ID: 24399686
I have an existing image I want to use how do I do that?
0
 

Author Comment

by:HawaiiDragon
ID: 24399702
I am also getting an error "File Not Found Exception: this is what i have done
namespace wackaemployee
{
    public partial class Form1 : Form
    {
 
      
 
 
        public Form1()
        {
              this.Cursor = new Cursor("Cursor1.cur"); 
            InitializeComponent();
        }
 
        private void button1_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("mailto

Open in new window

0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 24399792
Instead of doing "Add New Item," do "Add Existing Item." Then browse to your cursor file. In your last post, "Cursor1.cur" was the name of a file on my system--and it was just for demonstration. When you browse to your cursor file, you will change "Cursor1.cur" in the last post to "whatever you named it.cur".
0
 

Author Comment

by:HawaiiDragon
ID: 24399824
but where do I add it so there is not an error I tired in public partial class Form1 : Form but it exceptions out
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 24399844
Did you do Project->Add Existing Item? Once you do that, select the file that was added in Solution Explorer, then press F4 to bring up properties window. Change Build Action to "Content" and Copy to Output to one of the options relating to copying (Copy Always or Copy If Newer).
0
 

Author Comment

by:HawaiiDragon
ID: 24399865
yes and I put it in the publc Form1 () method so it would be loaded wih the form but when i try to run it it execptions out

        public Form1()
        {
               this.Cursor = new Cursor("stick3.png");  
            InitializeComponent();
        }

Open in new window

0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 24399887
Put line 3 after line 4. Like so:
public Form1()
{
    InitializeComponent();
    this.Cursor = new Cursor("stick3.png");  
}

Open in new window

0
 

Author Comment

by:HawaiiDragon
ID: 24415158
im still getting an exception error.
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 24421165
What is the exception message you receive?
0
 

Author Comment

by:HawaiiDragon
ID: 24423004
its a file noe found exception please see atached screen shot
exception.doc
0

Featured Post

How To Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

704 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