QuickStart Guide


Downloading the Control Library

To use our SwitchControl, you must first download the library file (.dll) that contains the control. To download the need file:
  • Go to our Downloads Page.
  • Click the newest version of the SwitchButton Control under the Recommended Download title.

Adding the Controls to Visual Studio's Toolbox

You have to place this item into Visual Studio's toolbox to use it. To add it to the toolbox:
  • Open Visual Studio.
  • Go to the Tools menu and click Choose Toolbox Items....
doc.QSG.1.png
  • Click the Browse button and find the control library you have just downloaded.
doc.QSG.2.png
  • Make sure the items are checked.
doc.QSG.3.png

Using the ValueChanged Event to Use the Controls

This control is controlled by a custom event named ValueChanged. To run this event, add the following code snippet into your current code:

Private Sub WindowsSwitchButton1_ValueChanged(sender As Object, e As EventArgs) _
  Handles WindowsSwitchButton1.ValueChanged
    If WindowsSwitchButton1.SwitchValue = _
SwitchButton.WindowsSwitchButton.SwitchValues._On Then
        'Place the code you wish to run when the switch is turned on
    ElseIf WindowsSwitchButton1.SwitchValue = _
SwitchButton.WindowsSwitchButton.SwitchValues._Off Then
        'Place the code you wish to run when the switch is turned off
    End If
End Sub

Last edited Feb 2, 2015 at 10:52 PM by tacorwin, version 4