Hi all,
I want to get the active control (control which has the focus or where the cursor is on) each time the cursor moves to another control or each time a control receives a focus.
How do i do this?
Thanks.
Printable View
Hi all,
I want to get the active control (control which has the focus or where the cursor is on) each time the cursor moves to another control or each time a control receives a focus.
How do i do this?
Thanks.
you can use me.activecontrol. you need to handle the _gotfocus event of your controls
Me.Active Control will work for getting the control that has the focus, but I don't think there is anything that easy for getting which control the Mouse is over.
Your best bet is to give all the controls the same MouseEnter event and in it use typeof sender to determine what type the control is and then trycast to convert it into to whatever control it is.
thanks..
i'll give it a try.