473,378 Members | 1,578 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

cursor Resources elp

Hi,

I have a user control and i have added .cur cursor files to the project
and trying to set .Cursor to new Cursor(gettype(), "cursorname.cur"); and I
am getting

An unhandled exception of type 'System.ArgumentNullException' occurred in
system.windows.forms.dll

Additional information: Value cannot be null.
Any ideas? The .cur reference is matching case and the .cur is in the
project.

Thanks
Nov 15 '05 #1
3 2662
Make sure it is an embedded resource and make sure that the cursor name
doesnt match a class name

James

--
Create interactive flowcharts, diagrams and UML models with ERM3 at
http://www.crainiate.net

<di********@discussion.microsoft.com> wrote in message
news:uN**************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a user control and i have added .cur cursor files to the project
and trying to set .Cursor to new Cursor(gettype(), "cursorname.cur"); and I am getting

An unhandled exception of type 'System.ArgumentNullException' occurred in
system.windows.forms.dll

Additional information: Value cannot be null.
Any ideas? The .cur reference is matching case and the .cur is in the
project.

Thanks

Nov 15 '05 #2
It is in the property panel as an "embedded resource" and its not matching
the class name.

Still a ARg null error arrr arg argghhh..

"James Westgate" <ja***@nospam.crainiate.com> wrote in message
news:uk**************@TK2MSFTNGP11.phx.gbl...
Make sure it is an embedded resource and make sure that the cursor name
doesnt match a class name

James

--
Create interactive flowcharts, diagrams and UML models with ERM3 at
http://www.crainiate.net

<di********@discussion.microsoft.com> wrote in message
news:uN**************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a user control and i have added .cur cursor files to the project and trying to set .Cursor to new Cursor(gettype(), "cursorname.cur"); and
I
am getting

An unhandled exception of type 'System.ArgumentNullException' occurred

in system.windows.forms.dll

Additional information: Value cannot be null.
Any ideas? The .cur reference is matching case and the .cur is in the
project.

Thanks


Nov 15 '05 #3
I believe you're mis-using that constructor. Have you read the docs for
this overload? The first argument is not the containing type, but should be
the type of the resource. My best guess is that you should change it to
something like:
new Cursor( typeof(Cursor), GetType().Namespace + ".cursorname.cur");

--
--Grant
This posting is provided "AS IS" with no warranties, and confers no rights.
<di********@discussion.microsoft.com> wrote in message
news:uN**************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a user control and i have added .cur cursor files to the project
and trying to set .Cursor to new Cursor(gettype(), "cursorname.cur"); and I am getting

An unhandled exception of type 'System.ArgumentNullException' occurred in
system.windows.forms.dll

Additional information: Value cannot be null.
Any ideas? The .cur reference is matching case and the .cur is in the
project.

Thanks

Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: sci | last post by:
Could someone help me by answering the questions below? What's a cursor? What's difference between Query and View? Is a RecordSet just part of a table? Can it be part of a query of view? If...
6
by: Michael Winter | last post by:
The following declaration was posted to a forum: cursor: url('path/some.cur'), hand, pointer, text, default; and I'm having a hard time convincing the poster that it's invalid. First of all,...
4
by: Manel G | last post by:
Hi This line works both in the debug and release mode: Me.Cursor = New Cursor(Me.GetType(), "NoCur.cur") After obfuscating the release exe I got this error message: ...
2
by: Paul Cheetham | last post by:
Hi, I am trying to load a custom cursor from my programs resources. I have successfully included the cursor resource, and I have confirmed that the name I am using is correct. Below is the...
3
by: Rud | last post by:
I'm still searching for an easy way to implement customized mouse pointers. I've searched in the help text but couldn't get the answer. Do I have to dig into the creation of resource files or is...
2
by: Peteroid | last post by:
This seems like it should be an easy task, but I just can't find the info on it. MSDN2 shows an example where the cursor is changed to the system default Cursors::Hand, but not how to make a custom...
6
by: Peter Oliphant | last post by:
I've now asked how three times in this forum with no answers. So I went to the 'windowsforms' newsgroup, and found this post, also unanswered, with the same problem: "Hello, I've tried to...
2
by: Dom | last post by:
I need to change the cursor when the mouse is hovering over certain cells in a DataViewGrid, as a visual aid for the user. But the cursor is not something found in the Cursors Class. I have a...
1
by: sCryptKeeper | last post by:
I'm trying to change the cursor while a drag and drop occurs between two lists in a winforms. I tried several ways (several tutorial and solutions) found over the web. I even tried to simply...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.