Mouse events

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to use the MouseEnter event but it isn't behaving how I'd like it
to. The problem is that if you hold down the mouse button over another
control (or the form) and then enter the control, the event isn't triggered.

Is there any way to make the MouseEnter event occur in this situation?
 
Barguast said:
I'm trying to use the MouseEnter event but it isn't behaving how I'd like
it
to. The problem is that if you hold down the mouse button over another
control (or the form) and then enter the control, the event isn't
triggered.

When you hold down the mouse on a control/window that window "captures" the
mouse to ensure that it will receive the MouseUp event from Windows. This
means that the mouse is not available to the other controls.
Is there any way to make the MouseEnter event occur in this situation?

Probably, but it'd likely involve some pretty nasty Win32 code. Are you sure
that this is so important?
 
The event that will be triggered is Dragging because the button is pressed.

cheers
Salva
 
Probably, but it'd likely involve some pretty nasty Win32 code. Are you sure
that this is so important?

It is pretty important. I've made a 'table' control that itself contains a
number of 'cell' controls. I'm trying to enable the ability to select a block
of cells like you would in a spreadsheet (hold the mouse button down over one
cell, release it over another cell, and select all the cells inbetween). I
was hoping to use the MouseEnter event of a cell to detect when the block
selection had changed but, as I said, the event won't trigger when the mouse
button is pressed down :(
 
None of the Drag events are triggering either. But then again, I wouldn't
have thought the Dragging events were supposed to trigger in this specific
situation...
 
Back
Top