Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim myShape1 As New ShapeControl Dim myShape2 As New ShapeControl With myShape1 .Name = "Shape No. 1" .Top = 100 .Left = 100 End With With myShape2 .Name = "Shape No. 2" .Top = 100 .Left = 400 End With AddHandler myShape1.Click, AddressOf ShapeClicked AddHandler myShape2.Click, AddressOf ShapeClicked Me.Controls.Add(myShape1) Me.Controls.Add(myShape2) End Sub Private Sub ShapeClicked(sender As System.Object, e As System.EventArgs) Dim myShape = DirectCast(sender, ShapeControl) MsgBox(myShape.Name) End Sub
I take it you missed my last post?
DLL exist in bin\debug directory of my project.Hi,
That's a bit vague since you give no indication what DLL you are talking about. On the basis that you have been creating a User Control, is this the DLL you are referring to? If so, then check to make sure the DLL exists in the bin\debug Directory of your Project.
Hope that helps.