Cool-LV Posted July 1, 2006 Report Share Posted July 1, 2006 Hello, Anybody knows call which API can reach to get mouse's status, not mouse position and click status I want , but its "Normal select" "Busy" "Working in background" etc status. thanks in advance. Quote Link to comment
crelf Posted July 1, 2006 Report Share Posted July 1, 2006 I would start here. Specifically here - this returns the handle to the current cursor - which allows you to determine its' status. Quote Link to comment
Cool-LV Posted July 3, 2006 Author Report Share Posted July 3, 2006 Specifically here - this returns the handle to the current cursor - which allows you to determine its' status. Thanks all, I have made one "GetCurrsor" sample attached, but, it is not well, as the cursor turns to "busy" status, and the back count is not changed. the count can changed at labVIEW front panel only, if the cursor is out of labVIEW front panel, it is no response. is anything wrong ? please help to point out. Download File:post-4703-1151896776.vi Quote Link to comment
Rolf Kalbermatter Posted July 4, 2006 Report Share Posted July 4, 2006 Thanks all, I have made one "GetCurrsor" sample attached, but, it is not well, as the cursor turns to "busy" status, and the back count is not changed. the count can changed at labVIEW front panel only, if the cursor is out of labVIEW front panel, it is no response. is anything wrong ?please help to point out. Changing the global cursor is not such a simple exercise. Basically Windows maintains a cursor state for each application and changes it accordingly whenever the cursor changes into a screen area owned by a different application. And in the case of LabVIEW it gets rather nasty for the application cursor. LabVIEW has the habit of resetting the cursor frequently to what it thinks it should be. But if you use LabVIEW 8 then you have already functions in the palatte to change the cursor state for at least LabVIEW. To change the global cursor consistently I'm afraid you would end up having to write some hook function again. Rolf Kalbermatter Quote Link to comment
Cool-LV Posted July 4, 2006 Author Report Share Posted July 4, 2006 Changing the global cursor is not such a simple exercise. Basically Windows maintains a cursor state for each application and changes it accordingly whenever the cursor changes into a screen area owned by a different application. And in the case of LabVIEW it gets rather nasty for the application cursor. LabVIEW has the habit of resetting the cursor frequently to what it thinks it should be. But if you use LabVIEW 8 then you have already functions in the palatte to change the cursor state for at least LabVIEW.To change the global cursor consistently I'm afraid you would end up having to write some hook function again. Rolf Kalbermatter Thanks rolfk, but I don't want to change the global cursor, I just want to get the global cursor's status. Quote Link to comment
Rolf Kalbermatter Posted July 5, 2006 Report Share Posted July 5, 2006 Thanks rolfk, but I don't want to change the global cursor, I just want to get the global cursor's status. Then read the entire MSDN article pointed to in the previous post! It mentions that GetCursor is only for the applciation cursor while there is a GetCursorInfo or similar function that will give you the global cursor (at least if you are not using an archeological Windows version). Rolf Kalbermatter Quote Link to comment
Cool-LV Posted July 6, 2006 Author Report Share Posted July 6, 2006 Then read the entire MSDN article pointed to in the previous post! It mentions that GetCursor is only for the applciation cursor while there is a GetCursorInfo or similar function that will give you the global cursor (at least if you are not using an archeological Windows version).Rolf Kalbermatter thanks rolfK, and I found msdn tells "[out] Pointer to a CURSORINFO structure that receives the information. Note that you must set CURSORINFO.cbSize to sizeof(CURSORINFO) before calling this function" I don't undertand well about "must set CURSORINFO.cbSize to sizeof (CURSORINFO)" what is the sizeof that I must pay attenction to ? and I set the cbSize to any count, labVIEW prompts error dialog box. that is my error vi. would you help to point out my error at your convenience time? thanks ! Download File:post-4703-1152159461.vi Quote Link to comment
cosmin Posted July 7, 2006 Report Share Posted July 7, 2006 thanks rolfK, and I found msdn tells "[out] Pointer to a CURSORINFO structure that receives the information. Note that you must set CURSORINFO.cbSize to sizeof(CURSORINFO) before calling this function" I don't undertand well about "must set CURSORINFO.cbSize to sizeof (CURSORINFO)" what is the sizeof that I must pay attenction to ? and I set the cbSize to any count, labVIEW prompts error dialog box. that is my error vi. would you help to point out my error at your convenience time? thanks ! Hi, inputs are wrong to the function, create the structure from docs cosmin Download File:post-4089-1152278395.vi Quote Link to comment
Cool-LV Posted July 10, 2006 Author Report Share Posted July 10, 2006 Hi,inputs are wrong to the function, create the structure from docs cosmin Thanks cosmin, it works. Quote Link to comment
guest4711 Posted October 5, 2006 Report Share Posted October 5, 2006 Hello everyone from Germany; I am no good programmer and do not know what labview is, but I have the problem, that I have to know when the cursor is changing, that is used by an other application. I did try HCURSOR hcursor; hcursor=GetCursor(); CURSORINFO cursorinfo; cursorinfo.hCursor=hcursor; cursorinfo.cbSize=sizeof(CURSORINFO); GetCursorInfo(&cursorinfo); But cursorinfo.cbSize always is '20' dec. and does not change. As my program is important for me I wold be endless thankful, if anyone could help me the program part make deliver a changing value when the cursor changes (into no hourglass but to a certain symbol in a java programm as an indicator of busy state of the strange application ). (or is it not possible to access a strange application's state?) Thanks yet Quote Link to comment
crelf Posted October 5, 2006 Report Share Posted October 5, 2006 Hello everyone from Germany; I am no good programmer and do not know what labview is... Although there's an outside chance that someone here might be able to help you out, this is a LabVIEW list - LabVIEW is a particular programming language. This is probably not the right forum to be asking this question. Good luck! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.