Ooops
January 19, 2021, 09:13:38 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Forum
Help
Search
Gallery
Login
Register
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
BlitzPlus Gui
»
[bb] Change Cursor Icon by Binary_Moon [ 1+ years ago ]
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: [bb] Change Cursor Icon by Binary_Moon [ 1+ years ago ] (Read 1260 times)
BlitzBot
Jr. Member
Posts: 1
[bb] Change Cursor Icon by Binary_Moon [ 1+ years ago ]
«
on:
June 29, 2017, 12:28:42 AM »
Title :
Change Cursor Icon
Author :
Binary_Moon
Posted :
1+ years ago
Description :
requires the userlibs
Code:
[Select]
.lib "user32.dll"
LoadCursor%( ID, Cursor ):"LoadCursorA"
SetCursor%( ID ):"SetCursor"
Code :
Code: BlitzBasic
window = CreateWindow
(
"Cursor Test"
,
200
,
200
,
200
,
200
,
0
,
1
)
canvas = CreateCanvas
(
0
,
0
,
200
,
200
,window
)
quit =
False
; Mouse Pointers
Const
IDC_ARROW =
32512
Const
IDC_IBEAM =
32513
Const
IDC_WAIT =
32514
Const
IDC_CROSS =
32515
Const
IDC_UPARROW =
32516
Const
IDC_SIZENWSE =
32642
Const
IDC_SIZENESW =
32643
Const
IDC_SIZEWE =
32644
Const
IDC_SIZENS =
32645
Const
IDC_SIZEALL =
32646
Const
IDC_NO =
32648
Const
IDC_HAND =
32649
Const
IDC_APPSTARTING =
32650
Const
IDC_HELP =
32651
Const
IDC_ICON =
32641
Const
IDC_SIZE =
32640
cursor = LoadCursor
(
0
,IDC_IBEAM
)
Repeat
Select
WaitEvent
(
)
Case
$201
;mouse down
SetCursor cursor
Case
$803
; window close
quit =
True
End Select
Until
quit =
True
End
Comments :
Dabbede(Posted 1+ years ago)
Wonderful!
Steve0(Posted 1+ years ago)
Where can I get the "user32.dll"?
Binary_Moon(Posted 1+ years ago)
<div class="quote"> Where can I get the "user32.dll"? </div>Erm... you're running windows yeah? Well its part of the operating system so you already have it. Just stick a text file with the lib information into the userlibs directory. Name it something like user32.decls and run the code.
thelizardking(Posted 1+ years ago)
awsome
Andres(Posted 1+ years ago)
Weird, as long as i held down mouse button my cursor wasn't displayed. Tryied even most of the cursors.
ShadowTurtle(Posted 1+ years ago)
Adres: you must call "SetCursor" after and before "flip"
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
SyntaxBomb - Indie Coders
»
Languages & Coding
»
Blitz Code Archives
»
BlitzPlus Gui
»
[bb] Change Cursor Icon by Binary_Moon [ 1+ years ago ]
SimplePortal 2.3.6 © 2008-2014, SimplePortal