Cursor Type

N

Necessitysslave

Hi,
I'm using Excel macros to interface with a third party piece of
software. mostly this is going well as I've taken to loading api
commands to run most of my interactions.

However, I'm trying to tell whether the system is currently working
(it'll save a lot of useless waiting time) but the only external sign
that the system is working is the mouse changing icon.

the code I've tried:

Private Declare Function CopyIcon Lib "user32" (ByVal hIcon As Long) As
Long
Private Declare Function GetCursor Lib "user32" () As Long

Sub curs()
Dim row As Integer
row = 2
Dim ttime As Long
Dim ttime1 As Long
Dim cursor
ttime = timeGetTime
Do
ttime1 = timeGetTime
Do
DoEvents
Loop Until ttime1 + 50 < timeGetTime
cursor = GetCursor
If Worksheets(1).Range("A" & row - 1) <> cursor Then
Worksheets(1).Range("A" & row) = cursor
row = row + 1
End If
Loop Until ttime + 20000 < timeGetTime
End Sub

all this is doing is monitoring the changing Icon this works wonders
until it gets to the third party program this program (SMS if anyone
knows it (its old!)) where it just sticks on the number 65544.

Has Anyone got any ideas that might help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top