PC Review


Reply
Thread Tools Rate Thread

Button state

 
 
joe
Guest
Posts: n/a
 
      7th Aug 2003
Hi,

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

Thanks
 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      7th Aug 2003
Hello,

"joe" <(E-Mail Removed)> schrieb:
> 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
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet


 
Reply With Quote
 
joe
Guest
Posts: n/a
 
      8th Aug 2003
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,

>-----Original Message-----
>Hello,
>
>"joe" <(E-Mail Removed)> schrieb:
>> 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
>--
>MVP · VB Classic, VB .NET
>http://www.mvps.org/dotnet
>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Button Down State shahoo Microsoft C# .NET 3 2nd Sep 2007 10:48 PM
How can a button control be forced to stay in "button down" state? =?Utf-8?B?RnJhbmtpZSBELg==?= Microsoft Dot NET Compact Framework 1 10th Feb 2006 09:34 PM
How to set a button's state to pressed state? =?Utf-8?B?ZWRnYXI=?= Microsoft VB .NET 3 6th Jul 2005 10:54 AM
State Button Mathieu Chavoutier Microsoft C# .NET 9 13th May 2004 11:16 AM
State of a button Mark A. Sam Microsoft Access Form Coding 4 16th Jan 2004 05:00 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:46 PM.