Re: Monitoring MouseMove anywhere within the screen. by Phil
Phil
Thu Feb 17 00:19:57 CST 2005
Hey there - now that's a novel approach!
I'll look at wrapping that up in some kind of object (creation of the form
and hiding it etc) so I just get a nice consistent set of mouse-move events
without worrying about that little slight of hand that's going on.
Basically what I'm doing is putting a resize grip on the bottom right corner
of a form that is borderless. Because it has none of the window's borders,
I've got to code all that kind of thing myself ( I have moving it handled).
The problem, as I described before, is that when the grip is dragged the
mouse invariably moves outside the control/form which is raising/handling
the move events (unless the mouse moves realllly slow - which is never the
case).
It seems strange that windows doesn't dish this info up somewhere - but I'm
gonna give that full-screen form idea a go.
Many thanks.
====
Phil
"Extreme Datasets" <ExtremeDatasets@discussions.microsoft.com> wrote in
message news:80D3A3AE-21FD-4151-AE55-62CADFE71F83@microsoft.com...
> Hello Phil,
>
> The easy way is to have a host form, resize to screen size during init to
> the screen size, you could set transparency key if you want to make it
> look
> like there is no form, and catch mousemove in the host form, perhaps use a
> panel to host controls
>
> there is a couple of more complicated ways you could do this but it
> depends
> on what you are trying to do
>
> let me know if you want more complicated ways but tell me what you are
> trying to do
>
> "Phil Jones" wrote:
>
>> Is it possible to track a general "MouseMove" event that monitors mouse
>> movement anywhere within the screen, not just within a the scope of a
>> Control?
>>
>> I'm writing logic that resizes a form on mouse move, but I'm finding that
>> when the mouse falls out of the size of the control/form I lose the
>> MouseMove event, and the resize operation ends.
>>
>> Hope that makes sense.
>>
>> Cheers everyone!
>> ====
>> Phil
>>
>>
>>