Tech Off Post

Single Post Permalink

View Thread: VB.NET Windows XP PowerPacks ShapeContainer disposing Error
  • User profile image
    davewill

    I'm not sure who alexkai is but the following seems the simplest:

    Protected Sub DisposeShapeContainer(ByVal AShapeContainer As Microsoft.VisualBasic.PowerPacks.ShapeContainer)
        If AShapeContainer IsNot Nothing Then
            If AShapeContainer.Shapes IsNot Nothing Then
                AShapeContainer.Shapes.Clear()
                AShapeContainer.Shapes = nothing
            End If
            AShapeContainer.Dispose()
            AShapeContainer = nothing
        End If
    End Sub