Button state

  • Thread starter Thread starter joe
  • Start date Start date
J

joe

Hi,

How can I query the state of a button (pressed or not)?
I could not find anything like that in MSDN.

Thanks
 
Hello,

joe said:
How can I query the state of a button (pressed or not)?
I could not find anything like that in MSDN.

You may want to use SendMessage (P/Invoke) + BM_GETSTATE.

HTH,
Herfried K. Wagner
 
Well, yes, if there is something missing in .NET library,
just go for the good, old APIs. I actually had to derive
my own button from System.Windows.Form.Button for other
purposes, so adding a bool variable and trapping
MouseUp/Down events was not a big deal. I was just
surprised that I could not find such a basic property...

Thanks,
 
Back
Top