View previous topic :: View next topic |
Author |
Message |
.lua Expert Cheater Reputation: 1
Joined: 13 Sep 2018 Posts: 189
|
Posted: Sat Nov 30, 2019 1:21 am Post subject: How to change the shape of mouse pointer |
|
|
Change the style of the mouse pointer by loading the (.cur) image
Description: |
|
Filesize: |
68.39 KB |
Viewed: |
5816 Time(s) |
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25299 Location: The netherlands
|
Posted: Sat Nov 30, 2019 4:22 am Post subject: |
|
|
untested but something like:
Code: |
cursor=executeCodeLocalEx("LoadCursorFromFileA","c:\\pass_over.cur")
UDF1.Cursor=cursor
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1261
|
Posted: Sat Nov 30, 2019 4:39 am Post subject: |
|
|
Normally, these features are authorized in "Form Designer".
But it does not work on the command line.
I think Dark Byte can understand the problem.
This code just didn't work:
Code: | UDF1.CELabel1.Cursor="crHandPoint" --or 'crHandPoint' or crHandPoint |
Description: |
|
Filesize: |
151.83 KB |
Viewed: |
5798 Time(s) |
|
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25299 Location: The netherlands
|
Posted: Sat Nov 30, 2019 5:05 am Post subject: |
|
|
cursor isn't a type but a handle
but there are some hardcoded cursor values like
handpoint which has value -21
these still need to be added to defines.lua
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
.lua Expert Cheater Reputation: 1
Joined: 13 Sep 2018 Posts: 189
|
Posted: Sat Nov 30, 2019 5:42 am Post subject: |
|
|
Dark Byte wrote: | untested but something like:
Code: |
cursor=executeCodeLocalEx("LoadCursorFromFileA","c:\\pass_over.cur")
UDF1.Cursor=cursor
|
| It seems that there is no such function
Description: |
|
Filesize: |
10.04 KB |
Viewed: |
5788 Time(s) |
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25299 Location: The netherlands
|
Posted: Sat Nov 30, 2019 8:33 am Post subject: |
|
|
as usual, 7.0 only
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
.lua Expert Cheater Reputation: 1
Joined: 13 Sep 2018 Posts: 189
|
Posted: Sat Nov 30, 2019 9:22 am Post subject: |
|
|
Dark Byte wrote: | as usual, 7.0 only | My ce7.0 test results are as follows。The mouse pointer style does not change
Description: |
|
Filesize: |
57.05 KB |
Viewed: |
5769 Time(s) |
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25299 Location: The netherlands
|
Posted: Sat Nov 30, 2019 9:26 am Post subject: |
|
|
print the result of cursor
is it 0 or nil?
and perhaps the windows api setCursor is needed (i never used custom cursers myself)
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
.lua Expert Cheater Reputation: 1
Joined: 13 Sep 2018 Posts: 189
|
Posted: Sat Nov 30, 2019 9:28 am Post subject: |
|
|
Dark Byte wrote: | print the result of cursor
is it 0 or nil?
and perhaps the windows api setCursor is needed (i never used custom cursers myself) | Printed out is a handle
|
|
Back to top |
|
|
AylinCE Grandmaster Cheater Supreme Reputation: 32
Joined: 16 Feb 2017 Posts: 1261
|
Posted: Sat Nov 30, 2019 9:44 am Post subject: |
|
|
Dark Byte wrote: | cursor isn't a type but a handle
but there are some hardcoded cursor values like
handpoint which has value -21
these still need to be added to defines.lua |
Thanks DB. This function was handy.
It's good that you think about fixing it again.
-------------------------------------------------
Note: Tested in 7.0. No error, but code doesn't work.
Windows 7, with the full path:
Code: | cursor=executeCodeLocalEx("LoadCursorFromFileA","C:\\Windows\\Cursors\\aero_link_l.cur")
UDF1.Cursor=cursor |
_________________
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25299 Location: The netherlands
|
Posted: Sat Nov 30, 2019 9:45 am Post subject: |
|
|
right, apparently custom cursors are done using the Screens class which is not exposed at the moment
try ExecuteCodeLocalEx("SetCursor", cursor)
but i fear that even if it works it fails on the control
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
.lua Expert Cheater Reputation: 1
Joined: 13 Sep 2018 Posts: 189
|
Posted: Sat Nov 30, 2019 10:08 am Post subject: |
|
|
Dark Byte wrote: | try ExecuteCodeLocalEx("SetCursor", cursor)l | It doesn't seem to work. The result of printing cursor is 0
|
|
Back to top |
|
|
Corroder Grandmaster Cheater Supreme Reputation: 75
Joined: 10 Apr 2015 Posts: 1667
|
Posted: Sun Dec 01, 2019 1:01 am Post subject: |
|
|
I simply use this.
Code: | f = createForm()
f.cursor = -21 -- handpoint
-- This is list of cursor code for free pascal, Work in CE Lua
-- ===========================================================
-- crAppStart = -19
-- crArrow = -2
-- crCross = -3
-- crDefault = 0
-- crDrag = -12
-- crHandPoint = -21
-- crHelp = -20
-- crHourGlass = -11
-- crHSplit = -14
-- crIBeam = -4
-- crMultiDrag = -16
-- crNo = -18
-- crNoDrop = -13
-- crNone = -1
-- crSizeAll = -22
-- crSizeNESW = -6
-- crSizeNS = -7
-- crSizeNWSE = -8
-- crSizeWE = -9
-- crSQLWait = -17
-- crUpArrow = -10
-- crVSplit = -15
-- =========================================================== |
_________________
Stealing Code From Stolen Code...
And Admit It.. Hmmm....Typically LOL |
|
Back to top |
|
|
.lua Expert Cheater Reputation: 1
Joined: 13 Sep 2018 Posts: 189
|
Posted: Sun Dec 01, 2019 2:39 am Post subject: |
|
|
Corroder wrote: | I simply use this | Do you know how to call styles outside the system
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25299 Location: The netherlands
|
Posted: Sun Dec 01, 2019 2:46 am Post subject: |
|
|
Code: |
f=createForm()
cursor=executeCodeLocalEx("LoadCursorFromFileA","c:\\pass_over.cur")
f.OnMouseMove=function()
ExecuteCodeLocalEx("SetCursor", cursor)
end
|
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
|