System.StackOverflowException when a I use a custom class

Im doing a system that draw customized diagrams


Im trying to implement this code
Imports System
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Drawing
Imports Nevron.Diagram
Imports Nevron.GraphicsCore
Imports Nevron.Dom
<Serializable()> _
Public Class tanques
    Inherits NRectangleShape
#Region " properties ..."
    Private e_conectado As String
    Public Property conectado() As String
        Get
            Return e_conectado
        End Get
        Set(ByVal value As String)
            e_conectado = value
        End Set
    End Property
#End Region

    Public Sub New(ByVal a As Single, ByVal b As Single, ByVal c As Single, ByVal d As Single)
        MyBase.New(a, b, c, d)
    End Sub
End Class

Open in new window

to use a customized shape when I add a new node

After I add the new node to the workspace everything looks fine but when I try to move the node with the mouse visual basic show the following error: "exception System.StackOverflowException on mscorlib.dll

I would like to know what is happend???

My custom form is ok???

Do I need to add another thing???

altariamx2003Asked:
Who is Participating?
 
käµfm³d 👽Commented:
Can you provide the definition of the NRectangleShape class?
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
...and if not handled by that class, we need to see the code that handles the moving of a node with the mouse.
0
 
altariamx2003Author Commented:
I dont have the code, this is what i got using .net reflector

 
NRECTANGLESHAPE
<Serializable> _
Public Class NRectangleShape
    Inherits NPathShape
    ' Methods
    <EditorBrowsable(EditorBrowsableState.Never)> _
    Public Sub New()
    Public Sub New(ByVal primitive As NRectanglePath)
    Public Sub New(ByVal rect As NRectangleF)
    Public Sub New(ByVal corners As NPointF())
    Public Sub New(ByVal leftTop As NPointF, ByVal rightBottom As NPointF)
    Public Sub New(ByVal location As NPointF, ByVal size As NSizeF)
    Public Sub New(ByVal corner1 As NPointF, ByVal corner2 As NPointF, ByVal corner3 As NPointF, ByVal corner4 As NPointF)
    Public Sub New(ByVal x As Single, ByVal y As Single, ByVal width As Single, ByVal height As Single)
    Protected Overrides Sub CreateDefaultLabels()
End Class


NPATHSHAPE
<Serializable, XmlInclude(GetType(NPolyPathShape)), XmlInclude(GetType(NArrowShape)), XmlInclude(GetType(NLineShape)), XmlInclude(GetType(NRectangleShape)), XmlInclude(GetType(NEllipseShape)), XmlInclude(GetType(NEllipticalArcShape)), XmlInclude(GetType(NCircularArcShape)), XmlInclude(GetType(NBezierCurveShape)), XmlInclude(GetType(NStepConnector))> _
Public MustInherit Class NPathShape
    Inherits NPrimitiveShape
    Implements INPoints, INDiagramElement, INElement, INNode, INIdentifiable, INUniquelyIdentifiable, INAttributeContainer, INAttributeObserver, ICloneable
    ' Methods
    Public Sub New(ByVal primitive As NPathPrimitive)
    Protected Overrides Function GetDefaultShapeElements() As ShapeElementsMask
    Public Overridable Function GetPointAt(ByVal index As Integer) As NPointF
    Public Overridable Function GetPointInfo(ByVal index As Integer) As NPointInfo
    Public Overridable Sub SetPointAt(ByVal index As Integer, ByVal point As NPointF)

    ' Properties
    <Category("Scene"), Description("Gets/sets the shape points"), XmlIgnore> _
    Public Overridable Property Points As NPointF()
    <Browsable(False)> _
    Public Overridable ReadOnly Property PointsCount As Integer
End Class

Open in new window

0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Where did you get the control from?

Without access to the code there are only a few options:
(1) The control is buggy.  Without source code you can't fix it.  Get rid of it...
(2) You are setting up the control wrong.  Without documentation we can't help you.
(3) You are doing something at run-time with the controls that it doesn't like.  Show us code or see #2.
0
 
altariamx2003Author Commented:
I know that there is a big problem, nrectangleshape is provided by the libraries of nevron

I know that you need the souce code, but right know its impossible to me

thx anyway for your time

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.