obrien.james

Member
Joined
Sep 11, 2009
Messages
15
Programming Experience
Beginner
Hi,

I have a panel control on a win form, to which I dynamically add a custom control.
The custom control inherits UserControls and in the New() sub, I assign the control a GUID.

When a control is added to the form, a variable of type List(Of T) holds the details of where i put the control and the size of it.

Within the custom control class there is a delete method. When the method, which deletes the custom control, is run I want the details of that custom control removed.

I think I need to use event handlers but I do not know how to handle these when the controls are added dynamically.

Any help would be greatly appreciated.

Thanks in advanced

James
 
Use:
VB.NET:
AddHander Object.Event, AddressOf YourMethod
That will allow your sub to handle the object's event you need to have handled
 

Latest posts

Back
Top