Public Class PushButton Implements IUIControl Dim m_rcRect As Drawing.Rectangle 'Interface implementation '........................ Public Sub Paint() Implements IUIControl.Paint ' Paint the control End Sub Public Function IsPtInControl(ByVal Pt As Drawing.Point) _ As Boolean Implements IUIControl.IsPtInControl IsPtInControl = Pt.Equals(ControlRect()) End Function Public Property ControlRect() As Drawing.Rectangle _ Implements IUIControl.ControlRect Get ControlRect = m_rcRect End Get Set(ByVal Value As Drawing.Rectangle) m_rcRect = Value End Set End Property Public Sub ControlPressed() Implements IUIControl.ControlPressed RaiseEvent ControlHit() End Sub Public Event ControlHit() Implements IUIControl.ControlHit 'Other class specific code '......................... End Class Public Class RadioButton Implements IUIControl Dim m_rcRect As Drawing.Rectangle 'Interface implementation '........................ Public Sub Paint() Implements IUIControl.Paint ' Paint the control End Sub Public Function IsPtInControl(ByVal Pt As Drawing.Point) _ As Boolean Implements IUIControl.IsPtInControl IsPtInControl = Pt.Equals(ControlRect()) End Function Public Property ControlRect() As Drawing.Rectangle _ Implements IUIControl.ControlRect Get ControlRect = m_rcRect End Get Set(ByVal Value As Drawing.Rectangle) m_rcRect = Value End Set End Property Public Sub ControlPressed() Implements IUIControl.ControlPressed RaiseEvent ControlHit() End Sub Public Event ControlHit() Implements IUIControl.ControlHit 'Other class specific code '......................... End Class