Get mouse global clicks without a hook

A

AliR \(VC++ MVP\)

Hi Everyone,

I'm writing a color picker control (combobox looking control, wonder why
..Net does not come with this control). It's a Button derived class that
when clicked, opens a form (without a title bar) just below it and displays
some "push like" colored radio buttons in it. I need to detect when the
user clicks anywhere outside the popup window so that I can close it.

Setting Form.Capture to true won't help since the user won't be able to
click on the radio buttons.

I don't want to set a Windows hook, since that would tie the control to the
windows API.

I'm looking for a .Net way of doing this without directly tapping into the
API.

I would appreciate any suggestion.

Thanks
AliR.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top