Imports classlibrary1

Public Class Form1

 

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick

        Me.Text = "Component11 instances: " & Component1.InstanceCount

 

    End Sub

 

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim cd As Component1

        Dim ct As Integer

        For ct = 1 To 1000

            cd = New Component1

        Next

    End Sub

End Class