Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

chang pointer in windows app

Posted on 2009-05-15
11
Medium Priority
?
258 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 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

916 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