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 the
function in which I make the change, the cursor reverts back to the standard
arrow cursor. I tried a simple test that changed the cursor to the wait
cursor via:
Cursor.Current = Cursors.WaitCur sor;
The same behavior occurs. The cursor changes, but reverts to the arrow as
soon as I leave the function where the change was made. I've searched the
archives for this newsgroup but couldn't find anything that would help me.
I'm open to ideas. I'm fluent in C++ dll writing if that would be useful.
Thanks,
Jim Frazer 2 9054
Jim,
AFAIK you can only set the cursor for a single window. So as you explained,
as soon as you move away from the calling window where the cursor was
changed the cursor changes back to the application default, which is the
pointer.
However, if i am wrong i am sure someone would point this out.
BTW have you tried changing the cursor of the main winform in your
application to see if this has the desired effect.
Regards
Scott Blood
C# Developer
"Jim Frazer" <ji*@nospam.net > wrote in message
news:uD******** ******@TK2MSFTN GP09.phx.gbl... 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 the function in which I make the change, the cursor reverts back to the standard arrow cursor. I tried a simple test that changed the cursor to the wait cursor via:
Cursor.Current = Cursors.WaitCur sor;
The same behavior occurs. The cursor changes, but reverts to the arrow as soon as I leave the function where the change was made. I've searched the archives for this newsgroup but couldn't find anything that would help me. I'm open to ideas. I'm fluent in C++ dll writing if that would be useful.
Thanks,
Jim Frazer
Hi Scott,
I tried changing the cursor in the Form_Load event to no avail. Perhaps
there's a better place than that.
I have a custom control for the drawing area and I would be happy if I could
change the cursor to a desired shape whenever the cursor is in the drawing
area. At the moment, I'm looking at other ways to notify the user that
he/she's in a special drawing mode. Changing cursor shape would be a great
way to do this since that's where the person's eyes are focused.
Thanks for responding.
Jim
"scott blood" <sc*********@ho tmail.com> wrote in message
news:O3******** ******@tk2msftn gp13.phx.gbl... Jim,
AFAIK you can only set the cursor for a single window. So as you explained, as soon as you move away from the calling window where the cursor was changed the cursor changes back to the application default, which is the pointer.
However, if i am wrong i am sure someone would point this out.
BTW have you tried changing the cursor of the main winform in your application to see if this has the desired effect.
Regards Scott Blood C# Developer "Jim Frazer" <ji*@nospam.net > wrote in message news:uD******** ******@TK2MSFTN GP09.phx.gbl... 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 the function in which I make the change, the cursor reverts back to the standard arrow cursor. I tried a simple test that changed the cursor to the wait cursor via:
Cursor.Current = Cursors.WaitCur sor;
The same behavior occurs. The cursor changes, but reverts to the arrow as soon as I leave the function where the change was made. I've searched the archives for this newsgroup but couldn't find anything that would help me. I'm open to ideas. I'm fluent in C++ dll writing if that would be useful.
Thanks,
Jim Frazer
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Robin Shuff |
last post by:
Hi,
I'm trying to limit the movement of the mouse cursor in using a VB app. The
idea is to stop the cursor straying on to the second monitor of a dual
screen set-up (i.e. a projector) while this program is running.
I've found and have been working with Knowledge Base Article 179192
(http://support.microsoft.com/default.aspx?scid=kb;en-us;179192) which
limits the mouse movement to inside a form, but I'd like to adapt this to be
limited...
|
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: 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: jcrouse |
last post by:
I have created a form designer type application (with a lot of you peoples
helpJ). It has label controls that are draggable at runtime. The user is
also allowed to change some properties such as forecolor, backcolor and
font. The labels also are rotatable and the text can also be flipped 180
degrees (the flipped text part is still being worked on). I have one context
menu for all 30 labels that allows for the property changes to the labels....
| |
by: Andy Baxter |
last post by:
hello,
I'm writing a panoramic image viewer in javascript. When the mouse is over
the image, I want it to be a crosshair (over most of the image), or a
hand/pointer (when it's over an image map region). The image map is
created in javascript, but doesn't set any 'cursor' style rules.
The problem I'm having is I have two images embedded inside two divs. The
outer div has style='... cursor:crosshair', but when I move over the image...
|
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: Mudcat |
last post by:
I was trying to design a widget that I could drag and drop anywhere in
a frame and then resize by pulling at the edges with the mouse. I have
fiddled with several different approaches and came across this behavior
when using the combination of place() and configure(cursor = ...) This
problem doesn't occur if you remove either one of these elements.
It's a very basic design of a button wrapped in a sizer frame and is
supposed to work like...
|
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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |