''' <summary> ''' SplitContainerの中は正しくアクティブなコントロールが取得できない対策 ''' </summary> ''' <value></value> ''' <returns></returns> ''' <remarks></remarks> Public Shadows Property ActiveControl As Control Get Return Me.GetRealActiveControl(MyBase.ActiveControl) End Get Set(value As Control) MyBase.ActiveControl = value End Set End Property ''' <summary> ''' SplitContainerの中でも正しくアクティブなコントロールを取得する関数 ''' </summary> ''' <param name="oActive"></param> ''' <returns></returns> ''' <remarks></remarks> Private Function GetRealActiveControl(oActive As Control) As Control If oActive Is Nothing Then Return Nothing End If If Not (TypeOf oActive Is ContainerControl) Then Return oActive End If Dim oChildActiveControl = DirectCast(oActive, ContainerControl).ActiveControl Return Me.GetRealActiveControl(oChildActiveControl) End Function