473,394 Members | 1,867 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,394 software developers and data experts.

How to change mouse cursor of a process?

Tee
Hi,

From my main form, I am executing another application using
System.Diagnostics.Process.Start.
The application has its own window displaying when the applicaiton is run.

I want to change the cursor to a hourglass. But I only can change my own
form's cursor using Cursor.Current, whenever I move my mouse cursor into the
window, the mouse cursor back to default cursor.
I want to change the cursor in the process's window too. Can anyone tell me
how to do that?
Thanks.
Nov 16 '05 #1
2 9583
The cursor icons are set per form, so you might have to add an hourglass
icon to the process form, when you are writing something like :
Cursor = Cursors.WaitCursor

then you are actually writing :

Me.Cursor = Cursors.WaitCursor

, so you need to get the handle to the process window, and then write
something like:

Me.Cursor = Cursors.WaitCursor
pProcessFrm.Cursor = Cursors.WaitCursor

-Inge

"Tee" <th*@streamyx.com> wrote in message
news:eH**************@TK2MSFTNGP10.phx.gbl...
Hi,

From my main form, I am executing another application using
System.Diagnostics.Process.Start.
The application has its own window displaying when the applicaiton is run.

I want to change the cursor to a hourglass. But I only can change my own
form's cursor using Cursor.Current, whenever I move my mouse cursor into
the
window, the mouse cursor back to default cursor.
I want to change the cursor in the process's window too. Can anyone tell
me
how to do that?
Thanks.


Nov 16 '05 #2
Here is a snippet of code that should give you the idea:

private void btnUpdateDatabase_Click(object sender, System.EventArgs e) {
sqlDataAdapter1.Update(sqlDataSet1);

//Turn on the hourglass cursor here.
this.Cursor = Cursors.WaitCursor;

sqlDataSet1.Clear();
sqlDataAdapter1.Fill(sqlDataSet1);

//Turn off the hourglass cursor here.
this.Cursor = Cursors.Default;
}
From http://www.developmentnow.com/g/36_2...-a-process.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
Jun 20 '07 #3

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

Similar topics

3
by: Csaba2000 | last post by:
I have set onmousedown to change the cursor, but this setting is ignored (IE 5.5; NN 6.1 on Win 2K Pro) until the mouse is either moved or the mouse button is released. On Opera 7.01, the setting...
1
by: Tee | last post by:
Hi, From my main form, I am executing another application using System.Diagnostics.Process.Start. The application has its own window displaying when the applicaiton is run. I want to change...
6
by: Carlos García-Carazo | last post by:
Hello, I am working on a C# application for an industrial machine, using Windows Forms, where the user could look at the screen from a 90 degree rotated position, like he could turn the monitor...
4
by: Maria | last post by:
Hello ! I try to change the cursor on the form like this : Me.Cursor = Cursors.WaitCursor 'reading from database 'showing file Me.Cursor = Cursors.Arrow
8
by: Eddie | last post by:
Hi All, I just want to change the mouse cursor during a process. I want a hourglass... How may I do it ? Thx
3
by: Steve Long | last post by:
I hope this isn't too stupid of a question but I'm looking for a way to change an item in a listview control when the mouse moves over it. I'd like to change its color and underline it for a...
6
by: Jan Heppen | last post by:
Is it posible to set something so that when my vb.net (visual studio 2005, framework 2.0) application is busy that the mouse pointer change into a hourglass ? Or do i have to set everywhere...
18
by: eliss.carmine | last post by:
Is it possible to simulate a mouse click in the window I made (it's a Form), but not give it focus? I tried using WinAPI's mouseevent and SendMessage of WM_LBUTTONDOWN/WM_LBUTTONUP as suggested...
5
by: Luke R | last post by:
1) Me.Cursor = Cursors.WaitCursor This works - except when you hover the mouse over a textbox or datagridview control, it doesnt show the waitcursor. 2) Me.UseWaitCursor = True This works if i...
0
by: Studlyami | last post by:
I am trying to find how windows translate the input from a HID device to an actual windows message; specifically, the mouse. I am trying to figure out how when the mouse moves the process windows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
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,...
0
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...

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.