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 .ICO file.
What is the most efficient way of doing this? Is a way to build the
cursor resource right into the executable, so that it travels with
the EXE? That seems to be the way other programs do it. For example,
I have a resource viewer that lets me see all the resources in Excel,
and I can find Icons, Cursors, etc.
Right now, what I do is this. In the load event of the main window, I
do m_AlternateCurs or = new Cursor (<AppStartupPat h>\filename), and I
plan to include the ICO file in the executable folder. 2 2374
Dom,
That's what I would do. You wouldn't have to worry about the file being
changed or deleted (of course, it means you have to recompile if the cursor
changes).
You can just add the file to your project and set the compile action to
"embedded resource" and then you would call the GetManifestReso urceStream
method on the Assembly class (the instance would represent the assembly you
are getting the embedded resource from). You could then pass that Stream to
the Cursor class, and use it appropriately.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m
"Dom" <do********@gma il.comwrote in message
news:4b******** *************** ***********@p69 g2000hsa.google groups.com...
>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 .ICO file.
What is the most efficient way of doing this? Is a way to build the
cursor resource right into the executable, so that it travels with
the EXE? That seems to be the way other programs do it. For example,
I have a resource viewer that lets me see all the resources in Excel,
and I can find Icons, Cursors, etc.
Right now, what I do is this. In the load event of the main window, I
do m_AlternateCurs or = new Cursor (<AppStartupPat h>\filename), and I
plan to include the ICO file in the executable folder.
On Mon, 31 Dec 2007 09:46:09 -0800, Dom <do********@gma il.comwrote:
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 .ICO file.
What is the most efficient way of doing this? Is a way to build the
cursor resource right into the executable, so that it travels with
the EXE?
Yes, just add a new Icon resource to the Resources of your project, using
the .ico file you have as the input.
You can then reference the icon from the Properties.Reso urces class of
your project.
I do agree that this is better than trying to include a separate file in
the same directory with your .exe, though assuming you're using a normal
Setup program to install the program, it shouldn't matter much which way
you do it since the user should never have to care about copying the files
manually.
Pete This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Videos 4 Sale |
last post by:
Would you know how to change the look of a mouse pointer on a web
page. On the page I have the mouse pointer is exactly as I have at
work.... white. But what I want to do is change the look of it so that
the people who visit the web page see a neon arrow (example) as
opposed to what they see now (which is the white arrow) Any Ideas? Its
driving me batty.
Many thanks
|
by: Geoff Soper |
last post by:
I'm trying to dynamically change the cursor of a couple of maps over an
image. Basically the image is in an online photo system where there is a
rotate mode. In this mode clicking on the left or right half of the image
rotates it 90 degrees to the left or right. I want to change the cursor to
indicate this but only while in the rotate mode. After looking at it in the
Mozilla DOM inspector it seems as if the style is changing but neither...
|
by: malbanese |
last post by:
I am building an ASP.Net application that occasionaly "stalls" while running a server side process like a large database update. During this tine the user does not get any feedback as to what is going on, an is likely to try clicking things multiple times which could result in an unwanted outcome.
Is there any way to change the mouse pointer to an hourglass or other such icon to signal the user that the request is being processed?
Thanks
...
|
by: Tim |
last post by:
Hi,
How would I go about changing the windows mouse cursor ? (Not the
mouse cursor on a form...but the actual mouse cursor in windows..)
Any ideas would be greatly appreciated
Thanks,
Tim
|
by: Dave |
last post by:
Is there a way to enlarge the text cursor? We need to make it a bit wider
to improve visibility and we cannot find any information about this.
Many, MANY thanks in advance!
| |
by: Craig G |
last post by:
how do you change the cursor in Asp.Net?
in windows app's i just used me.Cursor = Cursors.WaitCursor but it aint available in ASP.net
|
by: Jim Frazer |
last post by:
Hi,
I'm working on an application in C# that will allow the user to create
simple CAD drawings on a CEPC system. I would like to be able to change the
cursor shape depending on the drawing mode selected by the user. I started
out by setting up P/Invokes for LoadCursor and SetCursor. Calling
LoadCursor followed by SetCursor does allow me to change to a different
cursor, such as the cross cursor, but as soon as the application leaves...
|
by: mcraven.2 |
last post by:
I know this works on all objects except drop down boxes.
doc = document.all
for (i=0;i<doc.length;i++)
{
doc(i).style.cursor = 'wait';
}
Is it possible to make a cursor into an hourglass over a drop down?
|
by: fbergroth |
last post by:
Hi, I'm quite new to C# allthough I've been programming in other
languages for quite a while.
I'd like to change the blinking cursor inside a TextBox, I guess I
must derive the class and override the OnPaint()-method, however I
have no clue what to do next. I want to be able to switch the blinking
cursor to a solid, non-blinking, cursor and preferable have it with a
color.
So, how should I do that?
|
by: IanWright |
last post by:
I'm trying to change the cursor that appears on a standard ListView when the cursor appears over an item. However I am getting a flickering effect as the mouse is changed to a finger cursor, and then back to what I asked it to be.
I'm trying to isolate this flicker/changing to the hand cursor but can't figure out where it's occuring or how to stop it. To replicate this...
1) Create a form with a ListView on it.
2) Add an image list and...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |