Make the "hourglass" cursor stayTag(s): WinAPI/Registry


Sometime the cursor is resetted after database operations. To make sure the cursor stay in a known state, simply call the following APIs.
[FUNCTION DECLARATIONS]
FUNCTION ulong SetCapture(ulong a) LIBRARY "user32.dll"
FUNCTION boolean ReleaseCapture() LIBRARY "user32.dll"

[powerscript]
ulong ll_handle, ll_rc

ll_handle = Handle(this)
ll_rc = SetCapture(ll_handle)
SetPointer(hourglass!)

// some operations

ReleaseCapture()


blog comments powered by Disqus