Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Arrgh! How do I hide the cursor??

Arrgh! How do I hide the cursor??
Thread Tools
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
May 8, 2003, 11:13 AM
 
Hi.

I want to hide the cursor.

Any particular reason this doesn't work? I haven't been able to find a lot of documentation, but several places mention HideCursor():

Code:
#include <stdio.h> #include <Carbon/Carbon.h> int main() { InitCursor(); HideCursor(); sleep(10); ShowCursor(); return 0; }
The cursor stays right where it is when I run this.

Anyone have help?
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
May 8, 2003, 01:40 PM
 
I don't know if that's an exact example of what you're trying to do, but HideCursor() only applies to the calling application, so that code shouldn't do anything.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
Mithras  (op)
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
May 8, 2003, 01:48 PM
 
Oh. Drat. Thanks.

Do you know of any way to hide the cursor globally?

I'm adding code to the VNC server that dims the screen when you connect, so you can use your Mac remotely without anyone walking by seeing what you're up to.

I do this by adjusting all the gammas to zero, and that works great -- the screen turns black locally, but over VNC you can still see everything normal.

One little glitch is that the cursor still shows up, so someone walking by your Mac would see a little cursor flitting around a black screen.

It's not a big deal, but I'd like to turn the cursor invisible as well.

Thanks for the feedback.
     
Mac Elite
Join Date: Sep 2000
Location: Tempe, AZ
Status: Offline
Reply With Quote
May 8, 2003, 06:36 PM
 
Have you looked at CGAssociateMouseAndMouseCursorPosition in CGRemoteOperation.h? It looks like a good candidate.

Is this for OSXVnc?
Geekspiff - generating spiffdiddlee software since before you began paying attention.
     
Mithras  (op)
Professional Poster
Join Date: Oct 1999
Location: :ИOITAↃO⅃
Status: Offline
Reply With Quote
May 9, 2003, 06:20 AM
 
Ah, thanks, I figured it out.

Forgot I could just change the call to CGPostMouseEvent() to not update the local cursor position. That'll fix it.

Yes, it's for OSXvnc. I had made these changes, and a few others, to a 0.7 version a year or two, but never bothered to send them 'upstream' to a package maintainer.

But now I figured I should sync them up to the Redstone Software folks, since they're being nice enough to maintain it.
     
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status: Offline
Reply With Quote
May 9, 2003, 03:24 PM
 
Originally posted by Mithras:
One little glitch is that the cursor still shows up, so someone walking by your Mac would see a little cursor flitting around a black screen.
Actually that sounds pretty neat - I wouldn't mind - my wife would probably think the computer was possessed! She already gets freaked when she walks by and sees me using her machine remotely.

BTW, will the local user be able to override this? I would hate for some unauthorized person to find a way to connect to my machine and there be no way to stop him from the console.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:29 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2