How to Prevent the Click Event when a Button is Clicked

  • Thread starter Thread starter Charles Law
  • Start date Start date
Thanks Mick. It makes sense to avoid the interop if it is not necessary, so
I will use your suggestion.

Charles


"Mick Doherty"
 
Mick (& Herfried),
That's a keeper! I knew it was relatively easy, I just could not figure out
the words.

Hopefully I will remember where I kept it, the next time someone asks ;-)

Jay

"Mick Doherty"
 
It's a good solution for this problem, however if you want to draw in the
window so as to make some parts Opaque or Semi Transparent, then you'll find
that there is a problem with zOrder painting, which is why I usually create
Shaped controls.
 
I have done something similar with a combo box that I wanted to extend.
It is pretty easy to search and replace the variable declaration and
instance instantiation lines in the code. You could add a property like
Clickable with a default value of false, etc, and then when you want to
make all your buttons unclickable cycle through them and set their
Clickable property to false. It didn't end up being too bad for my
case.


Michael Isaacs - MCP
 
Hi Michael

I have settled on the idea from Herfried. Putting a transparent window in
front of my control does the trick. It is even easier as all my controls
inherit from my base control, so I only have to implement it in the base
class for it to work.

Thanks again.

Charles
 
Back
Top