469,616 Members | 2,559 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

Making the cursor invisible

236 100+
Hi,i'm making a game with vb6.0.Once the application is opened,the cursor must become invisible.does anyone know how to do this?
Mar 1 '08 #1
3 4395
168 100+
Yess!!!!!!!! I need to see the code at home. I thin it was like this

Dim A as Cursor
a.visible = False

Never mind . . I will send you about 5 hours OK??

Mar 1 '08 #2
Hey man. I use this one. It's easy and only 2 lines of code and actually works:

Private Declare Function ShowCursor Lib "user32" (ByVal bShow As Long) As Long

Declare that function in your general area. Then, use this to show/hide in the form or button code:

Hide cursor - ShowCursor 0
Show cursor - ShowCursor 1 (or any non-zero value)

It's really that easy. If it doesn't work let me know.
Mar 1 '08 #3
8,435 Expert 8TB
One thing to keep in mind with this function. I remember this from when I used it many years ago, so it may not apply any more. But here goes anyway.

It's important to always show again after hiding. Windows keeps count of the number of times the mousepointer has been hidden, and the number of times "unhidden". And it shows the pointer or not depending on whether the latter is equal to or higher than the former. So if you let the two counts get out of synch, the pointer may not come back until you restart Windows.
Mar 3 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Gary Richardson | last post: by
9 posts views Thread by I. Kobrinsky | last post: by
reply views Thread by melanieab | last post: by
reply views Thread by Peteroid | last post: by
1 post views Thread by AndrewF | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.