Glossary Item Box

LabDevTools Send comments on this topic.

VSwitch Constructor

In order to begin one new request of the control is necessary to use New constructor while, the used resources come released with the method Dispose.

 

Example:

 

[Visual Basic]

 

Dim vs As LabDevTools.VSwitch

Private Sub btnCreateVSwitch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateVSwitch.Click

       vs = New LabDevTools.VSwitch

       vs.Name = "vsMyVSwitch"

       vs.Height = 100

       vs.Width = 50

       Controls.Add(vs)

End Sub

 

Private Sub btnDisposeVSwitch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisposeVSwitchClick

         If Not IsNothing(vs) Then vs.Dispose()

End Sub

 

[C#]

 

LabDevTools.VSwitch vs;

private void btnCreateVSwitch_Click(object senderSystem.EventArgs e)

{

       vs = new LabDevTools.VSwitch();

       vs.Name = "vsMyVSwitch";

       vs.Height = 100;

       vs.Width = 50;

       Controls.Add(vs);

}

 

private void  btnDisposeVSwitch_Click(object senderSystem.EventArgs e)

{

          if(vs!=null){vs.Dispose();}

}

 

 


Copyright © 2007 LabDevTools. All Rights Reserved.