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 / hide mouse... but mouse hidden in titlebar

Author
Message
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 27th Mar 2004 07:11
Hello all.

I've got a customizable mouse cursor (sprite) that I use in my Windowed game. It works well, and when I go out of the bounds of the window with the mouse, the real windows cursor pops in. Lovely.

The problem is that the cursor is still hidden when it hovers over the title bar (top part of window). Does anybody know what I can do about this? Is there a 3rd party .dll or some command to tell whether the mouse is on top of the actual picture window, or the titlebar? Thanks for any help!
Tim Ballisto
20
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Right behind you.
Posted: 27th Mar 2004 14:53
if mousey()<0 then show mouse else hide mouse

put that somewhere in your loop.


Programs for programmers.
tiresius
21
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 28th Mar 2004 04:40
mousex() doesn't return anything less than 0. At least, I have mousex() displaying on the screen, and it just sticks at 0 if my cursor is over the title bar. It can even stick at 1-9 or so if I move the mouse really quick and the last time DBPro was aware of the mouse, it was mousex()=1..9

I don't think DBPro is aware of the mouse if it is on the title bar.

Any other ideas?
andrew11
21
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 28th Mar 2004 05:06 Edited at: 28th Mar 2004 05:12
perhaps you could hide it a different way, using user32.dll...

Lemme see ill make some code..

[edit]
This function i made does the same thing, so its not a problem with DarkBasic, rather a "feature" in Windows.


I would just do:


If the user moves the mouse up, the mouse will reappear before you get to the title bar.

"All programmers are playwrites and all computers are lousy actors" -Anon

Login to post a reply

Server time is: 2024-09-22 02:46:50
Your offset time is: 2024-09-22 02:46:50