views:

203

answers:

2

I'm currently using the ShowCursor API call to hide a cursor for an application after a set period of inactivity. This works fine, except that the cursor is hidden over both the menus and status bar (which I don't want). I'm also using a Form_MouseMove to switch the cursor back on, but this doesn't work over the menus or status bar.

Is there a clever way to target hiding the cursor to just on the Form (supplying a hWnd for example, to some API call or other)?

A: 

Isn't there something like Form1.MousePointer = vbHourGlass property?

Yes, here.

z-boss
Actually that's VB.Net. The VB6 reference manual entry is here http://msdn.microsoft.com/en-us/library/aa235192(VS.60).aspx
MarkJ
+1  A: 

I've tried this on my form:

With Me
    .MouseIcon = LoadPicture("C:\Windows\Cursors\blank.cur")
    .MousePointer = vbCustom
End With

having downloaded a blank.cur file off the internet.

The cursor disappears over the form, but is still visible over the menu bar.

quamrana
Thanks, that solution had crossed my mind, but I went off on an API tangent. Works a treat. If you want to see why I needed it, go and try my site: http://vbeeb.esmartweb.com/
Jonathan Swift