In VB.Net I am putting a RectangleShape on a user control. When I click on the shape as a usercontrol I want the usercontrol Click Event to Activate. I have tried various things but to no avail. It will fire a button Click but not the Usercontrol Click Event. I am a VB6 programmer trying to learn the VB.net and it is perplexing. I hope somebody out ther knows how to do this many thanks in advance.
I tried many things but not worked. It seems I should be able to send the Shape Click event to the usercontrol Click event but to no avail.
Throughout the .NET framework, an event named
ExampleEventhas a correspondingOnExampleEventmethod that raises it. If you want to raise a user control'sClickevent, you call itsOnClickmethod. If you want to raise the container event when the child event is raised, handle the child event and call theOnClickmethod in the event handler, e.g.To learn more about how events work internally, you might like to read this.