C
cser
Hi all,
I have a custom control which I have to hide when mouse clicks outside of
its client rectangle.
I have tried to use the timer control, which reads periodically
Control.MousePosition and deal if the click was out- or inside of the
control's rectangle. But I feel this is not the best solution. And there's a
problem with this: when I click tabcontrol's tabpage selector it does not
change the mouse position, so I cannot detect that mouseclick, and my
control stay visible. LostFocus event also doesn't work at not "input
control" clicks.
There is a good example: the combobox control. It works well (it can hide
its listbox) . But how does it work?
So any help?
Thanx
Cser
I have a custom control which I have to hide when mouse clicks outside of
its client rectangle.
I have tried to use the timer control, which reads periodically
Control.MousePosition and deal if the click was out- or inside of the
control's rectangle. But I feel this is not the best solution. And there's a
problem with this: when I click tabcontrol's tabpage selector it does not
change the mouse position, so I cannot detect that mouseclick, and my
control stay visible. LostFocus event also doesn't work at not "input
control" clicks.
There is a good example: the combobox control. It works well (it can hide
its listbox) . But how does it work?
So any help?
Thanx
Cser