Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / [b]Mouse X & Y[/b]

Author
Message
snecia
21
Years of Service
User Offline
Joined: 4th Nov 2002
Location:
Posted: 6th Nov 2002 20:08
Hello,

if i want my programme to do something like this :

if mouseX is between 10 and 20 and mouseY is between 10 and 20
do thist & that

endif

what would that do in darkBASIC (not DBPro since i dont have it yet)
jomo
21
Years of Service
User Offline
Joined: 31st Oct 2002
Location: Ireland
Posted: 6th Nov 2002 23:30


im pretty sure this will work

note that the coordate system starts at the TOP LEFT (0,0)
so this code should make something happen when the mouse is in the top left of the screen

slan
jomo
snecia
21
Years of Service
User Offline
Joined: 4th Nov 2002
Location:
Posted: 7th Nov 2002 12:48
thx

ChipOne
21
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Canada
Posted: 7th Nov 2002 22:55
or write a function:



then you can do this anywhere in your code:
if MouseIn(10, 10, 100, 400) then DoMyThing()

-= i only do what my rice krispies tell me to do =-

Login to post a reply

Server time is: 2024-03-29 15:34:22
Your offset time is: 2024-03-29 15:34:22