Checking button state programmatically 
Author Message
 Checking button state programmatically

Hi all

How can I check the state of the button (pushed or released) from code?

Thank you


Mon, 31 Jan 2005 04:03:42 GMT  
 Checking button state programmatically
Hi Dmitry,

I am assuming you are asking this for the Toolbar button.
If you have a Toggle type button on the Toolbar, you can check the Pushed
property of the button.
Using this property you can check if the button is pushed or not and you
can change it programatically too.

Here is some information from help:

Public Property Pushed As Boolean
Property Value
true if a toggle-style toolbar button is currently in the pushed state;
otherwise, false. The default is false.

When Pushed is set to true, the toolbar button appears sunken or inset
relative to the other buttons. This property has no effect unless the
ToolBarButtonStyle is set to ToggleButton.

Hope this helps!
Bharat Patel
Microsoft, Visual Basic .NET

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.              

Tue, 01 Feb 2005 05:39:32 GMT  
 [ 2 post ] 

 Relevant Pages 

1. check button state on Non-VB App

2. Check Button State

3. Checking for a Checked Radio Button

4. Check File state

5. Trap check box state change in DataGridBoolColumn

6. Checking And Changing Num Lock State

7. How to check state of TCP/IP connection

8. How to check state of TCP/IP connection

9. Checking on the state of a sound

10. Using Inet, checking state

11. Can VB check the state of NumLock?

12. How to check the Caps Lock state


Powered by phpBB® Forum Software