Guillermo Phillips
Guillermo Phillips

Reputation: 2216

Hide Cursor on Form in VB6

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)?

Upvotes: 0

Views: 2355

Answers (2)

quamrana
quamrana

Reputation: 39374

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.

Upvotes: 1

z-boss
z-boss

Reputation: 17608

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

Yes, here.

Upvotes: 0

Related Questions