Public Class MyForm Inherits System.Windows.Forms.Form Dim UIControls(2) As Object Public Sub OnMouseClick(ByVal sender As Object, _ ByVal e As EventArgs) Handles MyBase.Click Dim i As Integer For i = 0 To 2 If CType(UIControls(i), IUIControl).IsPtInControl(MousePosition()) Then CType(UIControls(i), IUIControl).ControlPressed() CType(UIControls(i), IUIControl).Paint() End If Next End Sub End Class