Jump to content

_GetCursor() Function


Recommended Posts

Ahh Yes. I was seeing a thread with a function.

Func _SetCursor($s_file=Default, $i_cursor=Default)

Local $newhcurs, $lResult

If $s_file=Default Then $s_file=@WindowsDir&"\cursors\arrow_m.cur"

If $i_cursor=Default Then $i_cursor=$OCR_NORMAL

$newhcurs = DllCall("user32.dll", "int", "LoadCursorFromFile", "str", $s_file)

If Not @error Then

$lResult = DllCall("user32.dll", "int", "SetSystemCursor", "int", $newhcurs[0], "int", $i_cursor)

If Not @error Then

$lResult = DllCall("user32.dll", "int", "DestroyCursor", "int", $newhcurs[0])

Else

MsgBox(0, "Error", "Failed SetSystemCursor")

EndIf

Else

MsgBox(0, "Error", "Failed LoadCursorFromFile")

EndIf

EndFunc ;==>_SetCursor

I want to get the original cursor set this cursor and then load the app and then get the orig cursor back. is this possible?

Link to comment
Share on other sites

That thread is probably the answer to your question so I found it back for you.. it's very well written and not that hard to use, but since your post is so "well written", not to mention the raw pasting of the code, it's not easy to get what you want... ._.

Nevermind.. good luck.

Link to comment
Share on other sites

  • Moderators

I'll only say this once... stop bumping your thread, no matter how much you want something, it isn't fair to others that are also looking for help for their threads to continuously get pushed down by your bumps.

If you need to bump, wait 24 hours, if you bump 3 times, consider it a dead question and try to find the resolution on your own (In other words, don't bump again.).

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • 2 weeks later...

once again flipping through old topics and such, and found this, this appears to be a possible good function, has anyone found the answer to this, hmm, i think i can convert that microsoft call to a dllcall, im going to try to make these some functions and submit them in a UDF. i tried looking at the simalarities between the _setcursor, and the getcursorinfo on microsofts website, and they appear to have no comparisen with the dllcall in the sample script above. hmm

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...