Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Create custom control from MS boolean control?

Greetings from Michigan,

 

Is is possible to create a custom control from a Measurement Studio control, particular a boolean button or switch control?  I have an application where I want to use a Measurement Studio switch control that inherits from another third party control.  Is this possible?

 

Thanks,

D

0 Kudos
Message 1 of 5
(3,209 Views)

When you say "inherit", are you talking about behavior or just visual appearance? For instance, in WPF a control can be given a new visual appearance through a custom control template. Alternatively, with a user control you can use composition to include multiple controls in a single logical instance. However, multiple inheritance for classes is not supported by the .NET framework.

~ Paul H
0 Kudos
Message 2 of 5
(3,180 Views)

Yes, I am talking about behavior.  There is another third party control that I have that is also a switch type control.  It has a few properties that I need to be able to use, but I want to keep the appearance and everything else of the Measurement Studio switch control.  So it appears I won't be able to do that.

0 Kudos
Message 3 of 5
(3,171 Views)

Depending on the properties involved, it may be possible to get equivalent behavior from the switch control (it is hard to say without knowing more details). But there is no general way to mix-and-match properties/behaviors across multiple controls.

~ Paul H
0 Kudos
Message 4 of 5
(3,168 Views)

I am using "AdvancedHMI" which is free (download from here).  It comes with a bunch of its own custom industrial style HMI controls in order to write a .NET program and use as an HMI to talk to AB and other brand PLC's.  It's rather good.  However, I have another identical machine (other than the brand PLC) that I wrote a .NET UI for a while back, but I used Measurement Studio controls exclusively for that.  I wrote all my own communications for communicating back and forth from the UI to the PLC for that machine.  It wasn't bad but rather tedious and monotonous.  AdvancedHMI makes it easy as you are just required to drop one of their Communications Drivers down on your form, drop a control on the form (Switch in my case), then give it a PLC address in the appropriate field/s in the control's properties pane.  But.....in order to make both machine's UI's identical for user ease, I'd like to use the Measurement Studio switch for this UI as well, but I need to be able to write to the PLC addresses (AdvancedHMI's Switch functionality).  There is a short example on their website where they make a custom control from another third party control - here.  I tried to follow that but wasn't able to make it work.  I'm now thinking I won't be able to do it with Measurement Studio controls (?).  

 

Here as screenshot of the Selector Switch from "AdvancedHMI".  In their example, all they did was take an AdvancedHMI control, (after they added appropriate references, etc) and change first line of code - "Inherits...."

SelectorSwitch.jpg

0 Kudos
Message 5 of 5
(3,162 Views)