You need to "Capture" the mouse, otherwise you will not receive mouse events
when pointer is outside your window.
To do this you set the Capture property of your form to true. When ever your
application looses focus you should set the Capture property back to false.
Normally you only use this "capture" function in controls within a form. If
you capture mouse events outside your main form I guess you need to pass the
events on to the window that the mouse hoovers.
/Magnus
[quoted text, click to view] "Logan Mckinley" <logan@globalweb.net> wrote in message
news:OGC6sFNfDHA.956@TK2MSFTNGP09.phx.gbl...
> Am i correct that this API will just return the location of the mouse? If
> so I am currently able to get that using "Cursor.Position". My problem is
i
> need to query this every time the mouse moves and don't know the event
that
> fires when the mouse is not over my form.
> Thanks,
> ~Logan
>
> "Rafael J. Pellicer" <rafaelpp@cantv.net> wrote in message
> news:%23SjD4yMfDHA.3228@tk2msftngp13.phx.gbl...
> >
> > With API: GetCursorPos Lib "user32" Alias "GetCursorPos" (lpPoint As
> > POINTAPI) As Long
> >
> >
> >
> >
> > "Logan Mckinley" <logan@globalweb.net> escribió en el mensaje
> > news:eNMX5kMfDHA.1872@TK2MSFTNGP09.phx.gbl...
> > > I need to be able to detect mouse movement even when it is not over my
> > > application. I can get the mouse cords using MousePosition but I am
not
> > > sure if there is an event that hits my program when the mouse is not
> over
> > my
> > > program.
> > > One idea i had was make a child form that was transparent and use the
> > > MouseMove event to keep that transparent window under the mouse but
the
> > > transparent window did not catch the MouseMove event.
> > > I also tried putting a timer on the form that checks MousePosition but
> to
> > > make it smooth i would have to check it so often that it is to
processor
> > > intensive.
> > >
> > > Any help is appriciated,
> > > Thanks in advance,
> > > ~Logan
> > >
> > >
> >
> >
>
>