PDA

View Full Version : Cursor won't hide until Timer


longedge
10-10-2004, 01:36 PM
I'm trying to hide the cursor as soon as my app (a slideshow) runs. I rely on e_Key being >0 to exit.

It all works except that the only place I can get setCursor to work is in the timer event, so I have to wait for the event to fire before my cursor is hidden.

I've tried the page preload and show and also the on enter event of both the image objects I have on the page - they fully cover my page and cross fade.

Is there anything else I can try?

longedge
10-10-2004, 04:06 PM
Thanks to WORM once again for the solution, just in case it's of use to anyone else -

function HideCursor()
result = DLL.CallFunction(_SystemFolder.."\\User32.dll", "ShowCursor", "0", DLL_RETURN_TYPE_INTEGER, DLL_CALL_CDECL);
end

function ShowCursor()
result = DLL.CallFunction(_SystemFolder.."\\User32.dll", "ShowCursor", "0", DLL_RETURN_TYPE_INTEGER, DLL_CALL_CDECL);
end

Action in preload - HideCursor();

Worm
10-10-2004, 05:08 PM
Actually, I got a little to careless with Cut and Paste :)

The functions should be this:

function HideCursor()
result = DLL.CallFunction(_SystemFolder.."\\User32.dll", "ShowCursor", "0", DLL_RETURN_TYPE_INTEGER, DLL_CALL_CDECL);
end

function ShowCursor()
result = DLL.CallFunction(_SystemFolder.."\\User32.dll", "ShowCursor", "1", DLL_RETURN_TYPE_INTEGER, DLL_CALL_CDECL);
end

longedge
10-10-2004, 05:20 PM
Ahhh.. that's why it wouldn't come back - although it didn't matter for my purposes - :)