Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

CW Button in Visual Studio 2010?

I used to use the CW button control in VB6 applications, which gave me momentary/maintained buttons. These were used to emulate a control panel and worked great.

Measurement Studio 2010 no longer has the button control, which I think is a great loss for any application development.

 

Is there a way of using the CW.button control in 2010?

Does any version of measurement studio, compatible with VS2010 C#, have similar button components?

0 Kudos
Message 1 of 7
(5,994 Views)

Are you referring to the IsMomentary property on the WPF BooleanButton control, or the SwitchUntilReleased value for the InteractionMode property on the Windows Forms Boolean control?

~ Paul H
0 Kudos
Message 2 of 7
(5,985 Views)

Hi Paul,

 

The SwitchUntilReleased for Windows Forms...

 

0 Kudos
Message 3 of 7
(5,983 Views)

In that case, you can use the Switch or Led controls derived from Boolean. For SwitchUntilReleased, when you press the mouse down on the control, the Value property is updated and the StateChanged event is raised; when the mouse is released, Value is reverted and StateChanged is raised again.

~ Paul H
0 Kudos
Message 4 of 7
(5,979 Views)

Hi Paul,

 

Sorry but I don't know how to implement that.

Can you give me some exmple code in C#

 

I've got an LED button on the form but can't see how to use the SwitchUntilReleased Smiley Sad

0 Kudos
Message 5 of 7
(5,967 Views)

In code, you would use switch1.InteractionMode = BooleanInteractionMode.SwitchUntilReleased; to set the interaction mode. In the designer, you can use the property grid, or the smart tag:


SwitchSmartTag.png

~ Paul H
0 Kudos
Message 6 of 7
(5,960 Views)

Hi Paul,

 

Got it. Sorry, I had an older version of mesurement studio installed. I've installed 2013 version and now it works Smiley Happy

 

Thanks a lot for your advice!

0 Kudos
Message 7 of 7
(5,956 Views)