Glossary Item Box

LabDevTools Send comments on this topic.

VOldSwitch 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 ovs As LabDevTools.VOldSwitch

Private Sub btnCreateVOldSwitch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateVOldSwitch.Click

       ovs = New LabDevTools.VOldSwitch

       ovs.Name = "MyVOldSwitch"

       ovs.Height = 150

       ovs.Width = 50

       Controls.Add(ovs)

End Sub

 

Private Sub btnDisposeVOldSwitch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisposeVOldSwitchClick

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

End Sub

 

[C#]

 

LabDevTools.VOldSwitch ovs;

private void btnCreateVOldSwitch_Click(object senderSystem.EventArgs e)

{

       ovs = new LabDevTools.VOldSwitch();

       ovs.Name = "MyVOldSwitch";

       ovs.Height = 150;

       ovs.Width = 50;

       Controls.Add(ovs);

}

 

private void  btnDisposeVOldSwitch_Click(object senderSystem.EventArgs e)

{

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

}

 


Copyright © 2007 LabDevTools. All Rights Reserved.