Glossary Item Box
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
pb As LabDevTools.PushButton Private Sub btnCreatePushButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreatePushButton.Clickpb =
New LabDevTools.PushButtonpb.Name = "hsMyPushButton"
pb.Height = 100
pb.Width = 50
Controls.Add(pb)
End SubPrivate Sub btnDisposePushButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDisposePushButtonClick If Not IsNothing(pb) Then pb.Dispose() End Sub
[C#]
LabDevTools.PushButton pb;
private void btnCreatePushButton_Click(object sender, System.EventArgs e)
{
pb = new LabDevTools.PushButton();
pb.Name = "hsMyPushButton";
pb.Height = 100;
pb.Width = 50;
Controls.Add(pb);
} private void btnDisposePushButton_Click(object sender, System.EventArgs e){
if(pb!=null){pb.Dispose();} }
Copyright © 2007 LabDevTools. All Rights Reserved.