Mouse cursor always shows Busy?

Scenario: when I am trying to get the status of cursor by “System.Windows.Forms.Cursor.Current.ToString.ToLower” it is always returning [cursor: waitcursor] even if cursor is not busy

Steps to reproduce: tried in different versions

Current Behavior: always shows wait

Expected Behavior: should say default if cursor is not busy

Studio/Robot/Orchestrator Version: 2017 and 2016

Last stable behavior: never tried
Last stable version: 2016 n 2017
OS Version: windows 10 enterprise
Others if Relevant: (workflow, logs, .net version, service pack, etc):

Did you find a solution? I am having the same problem.

1 Like

Here is an example that shows a busy cursor or a handle in the Log. Any help would be greatly appreciated. What I see right now is only 65543 as my cursor handle.Main.xaml (11.5 KB)

I was able to figure it out:

  1. Go to manage packages and install PInvoke.User32
  2. Invoke the code below to create a pause while cursor is busy or application is opening or it is not loaded yet:

Dim cinfo As PInvoke.User32.CURSORINFO
Dim hndl As Integer
cinfo.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(cinfo)
Call pinvoke.User32.GetCursorInfo(cinfo)
hndl = cinfo.hCursor.ToInt32
Loop While (hndl = 65543 Or hndl = 65561 Or hndl =0)

Your handles could be different, but you can use the same code to figure them out.


I try to execute your code but it is not working properly which means even if cursor status changed also it is waiting . Please let me know if need any modifications.
Best Regards,
Likith Rajesh.

Hello Dear,
I am facing the same issue. Could you found any solution ?

Mahendra Choudhary.

Hi Folks. Any solution to this issue? I’m also facing situation where cursor.current always show busy.



Thank you @Vitalijs_Arkulinskis. This solution worked for me!

I tweaked the code a little though:

Dim cinfo As PInvoke.User32.CURSORINFO
Dim hndl As Integer
Dim n As Integer
Dim i As Integer = 0
n = CInt(in_Timeout/500) 'Max number of times loop is executed
cinfo.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(cinfo)
Call pinvoke.User32.GetCursorInfo(cinfo)
hndl = cinfo.hCursor.ToInt32
i = i + 1
Loop While (hndl = 65545 And i<n)
If i = n
out_TimeoutExceeded = True
End if

  1. Included “cinfo.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(cinfo)” within the Do While loop
  2. Included out_TimeoutExceeded as an output parameter
  3. Included a boolean output to notify if timeout is exceeded
  4. Changed handl value to 65543 to suit my machine