Solved

chang pointer in windows app

Posted on 2009-05-15
11
250 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
  • 6
  • 5
11 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
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.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

773 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