Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 10th, 2005, 05:57 AM
Authorized User
 
Join Date: Jan 2005
Location: Kolkata, West Bengal, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to solve System.StackOverFlowException

Hi all,

          Can any One help me? I am try to build a custome user control in vb.net 2003 Framework 1.1 using MSFlex Grid and And a TextBox, But after Sucessfully Build the solution , When I am try to use this control to my another program its Thrown an System.StackOverFlowException.

         I am very much confuse that How can I solve this problem?

Waiting for Reply.
Thanks in Advance.
Sibaji Basak



Reply With Quote
  #2 (permalink)  
Old February 10th, 2005, 08:32 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

what are you doing with the control that this occurs?
Reply With Quote
  #3 (permalink)  
Old February 10th, 2005, 09:40 AM
Friend of Wrox
 
Join Date: Dec 2004
Location: Chennai, Tamil nadu, India.
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

Sibaji.. with this limited info i don't think we could think of some solution. Share more information about what you are doing or paste the piece of code which is not working.

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
Reply With Quote
  #4 (permalink)  
Old February 11th, 2005, 12:36 AM
Authorized User
 
Join Date: Jan 2005
Location: Kolkata, West Bengal, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Vadivel,

              Using Flex Grid and Text Box I want to make a editable Flex Grid.
I had already make this type control through vb6 and it is working fine.

But When I am try to build the same type of control in vb.net. It is build sycessfully. But When I try to use this control in Vb.Net its thrown that error.

Sample Code:-----

#Region "Private Variable Declaration For Grid"
    Private GridApperance As MSFlexGridLib.AppearanceSettings
    Private UserResizing As MSFlexGridLib.AllowUserResizeSettings
    Private HighLight As MSFlexGridLib.HighLightSettings
    Private GridScrollBar As MSFlexGridLib.ScrollBarsSettings
    Private GridSection As MSFlexGridLib.SelectionModeSettings
    Private GridSort As MSFlexGridLib.SortSettings
    Private GridText As MSFlexGridLib.TextStyleSettings
    Private GridPicture As MSFlexGridLib.PictureTypeSettings
    Private GridForMatString As String
    Private MyGridColor As Color
    Private HighlightColor As Color
    Private FixedCColor As Color
    Private MyGridBKG As Color
    Private MyBackBolor As Color
    Private TotFixedRow As Integer = 1
    Private TotFixedCol As Integer = 1
    Private RowNo As Integer = 1
    Private ColNo As Integer = 2
    Private FixedColWidth As Integer = 0
#End Region

#Region "Public Grid Property"

    Public Property FixedColoumnWidth() As Integer
        Get
            Try
                Return Me.FixedColWidth
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Integer)
            Try
                FixedColWidth = Value
                Me.ADONISFlexGrid.set_ColWidth(0, FixedColWidth)
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property TotalColumnNo() As Integer
        Get
            Try
                Return Me.ColNo
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Integer)
            Try
                ColNo = Value
                Me.ADONISFlexGrid.Cols = ColNo
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property TotalRowNo() As Integer
        Get
            Try
                Return Me.RowNo
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Integer)
            Try
                RowNo = Value
                Me.ADONISFlexGrid.Rows = RowNo
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property FixedColNo() As Integer
        Get
            Try
                Return Me.TotFixedCol
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Integer)
            Try
                Me.TotFixedCol = Value
                Me.ADONISFlexGrid.FixedCols = Me.TotFixedCol
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property FixedRowNo() As Integer
        Get
            Try
                Return Me.TotFixedRow
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Integer)
            Try
                Me.TotFixedRow = Value
                Me.ADONISFlexGrid.FixedRows = Me.TotFixedRow
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property CustomeGridColor() As Color
        Get
            Try

            Catch ex As Exception

            End Try

        End Get
        Set(ByVal Value As Color)
            Try

            Catch ex As Exception

            End Try

        End Set
    End Property

    Public Property CustomeBackColor() As Color
        Get
            Try
                Return Me.MyBackBolor
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Color)
            Try
                Me.MyBackBolor = Value
                Me.ADONISFlexGrid.BackColor = Me.MyBackBolor
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property GridBackGroundColor() As Color
        Get
            Try
                Return Me.MyGridBKG
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Color)
            Try
                Me.MyGridBKG = Value
                Me.ADONISFlexGrid.BackColorBkg = Me.MyGridBKG
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property FixedControlColor() As Color
        Get
            Try
                Return Me.FixedCColor
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Color)
            Try
                Me.FixedCColor = Value
                Me.ADONISFlexGrid.BackColorFixed = Me.FixedCColor
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property SelectedRowColor() As Color
        Get
            Try
                Return Me.HighlightColor
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Color)
            Try
                Me.HighlightColor = Value
                Me.ADONISFlexGrid.BackColorSel = Me.HighlightColor
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property AllowUserResizingGrid() As MSFlexGridLib.AllowUserResizeSettings
        Get
            Try
                Return Me.UserResizing
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As MSFlexGridLib.AllowUserResizeSettings)
            Try
                Me.UserResizing = Value
                Me.ADONISFlexGrid.AllowUserResizing = Me.UserResizing
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property CustomeAppearance() As MSFlexGridLib.AppearanceSettings
        Get
            Try
                Return Me.GridApperance
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As MSFlexGridLib.AppearanceSettings)
            Try
                Me.GridApperance = Value
                Me.ADONISFlexGrid.Appearance = Me.GridApperance
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property HighlightStyle() As MSFlexGridLib.HighLightSettings
        Get
            Try
                Return Me.HighLight
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As MSFlexGridLib.HighLightSettings)
            Try
                Me.HighLight = Value
                Me.ADONISFlexGrid.HighLight = Me.HighLight
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property ScrollBarStyle() As MSFlexGridLib.ScrollBarsSettings
        Get
            Try
                Return Me.GridScrollBar
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As MSFlexGridLib.ScrollBarsSettings)
            Try
                Me.GridScrollBar = Value
                Me.ADONISFlexGrid.ScrollBars = Me.GridScrollBar
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property SelectionMode() As MSFlexGridLib.SelectionModeSettings
        Get
            Try
                Return Me.GridSection
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As MSFlexGridLib.SelectionModeSettings)
            Try
                Me.GridSection = Value
                Me.ADONISFlexGrid.SelectionMode = Me.GridSection
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property PictureTypeSettings() As MSFlexGridLib.PictureTypeSettings
        Get
            Try
                Return Me.GridPicture
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As MSFlexGridLib.PictureTypeSettings)
            Try
                Me.GridPicture = Value
                Me.ADONISFlexGrid.PictureType = Me.GridPicture
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property GridHeading() As String
        Get
            Try
                Return Me.GridForMatString
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As String)
            Try
                Me.GridForMatString = Value
                Me.ADONISFlexGrid.FormatString = Me.GridForMatString
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property


#End Region

#Region "Public Grid Function"

    Public Function SetColWidth(ByVal ColumnIndex As Integer, ByVal ColumnWidth As Integer) As Integer
        Try
            Me.ADONISFlexGrid.set_ColWidth(ColumnIndex, ColumnWidth)
            Return SetColWidth
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Function

    Public Function ColumnHeadingAlignment(ByVal ColumnIndex As Integer, ByVal AlignmentIndex As Short) As Integer
        Try
            Me.ADONISFlexGrid.set_FixedAlignment(ColumnIndex, AlignmentIndex)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Function
#End Region

#Region "Grid Event"

    Private Sub CustomiseFlexGrid_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            Me.ADONISFlexGrid.set_ColWidth(0, 500)
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
#End Region
______________________________________________

#Region "Private Variable for TextBox"
    Private TxtVixible As Boolean
    Private TxtEnabled As Boolean
    Private TxtMaxLen As Integer
    Private TxtToolTips As String
    Private TxtReadOnly As Boolean
    Private TxtForeColor As Color
    Private TxtBackColor As Color
    Private TxtFont As Font
    Private TxtFontDialog As FontDialog
    Private TxtCharFormat As CharacterCasing
    Private TxtPassChar As Char
#End Region

#Region "Public Property for TextBox"

    Public Property VisibleTextBox() As Boolean
        Get
            Try
                Return Me.TxtVixible
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Boolean)
            Try
                Me.TxtVixible = False
                Me.TextBox1.Visible = Me.TxtVixible
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property EnabledTextBox() As Boolean
        Get
            Try
                Return Me.TxtEnabled
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Boolean)
            Try
                Me.TxtEnabled = Value
                Me.ADONISFlexGrid.Enabled = Me.TxtEnabled
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property TextBoxMaxLength() As Integer
        Get
            Try
                Return Me.TxtMaxLen
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Integer)
            Try
                Me.TxtMaxLen = Value
                Me.TextBox1.MaxLength = Me.TxtMaxLen
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property TxtBoxToolTips() As String
        Get
            Try
                Return Me.TxtToolTips
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As String)
            Try
                Me.TxtBoxToolTips = Value
                Me.ToolTip1.SetToolTip(Me.TextBox1, Me.TxtToolTips)
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property TextBoxReadOnly() As Boolean
        Get
            Try
                Return Me.TxtReadOnly
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Boolean)
            Try
                Me.TxtReadOnly = Value
                Me.TextBox1.ReadOnly = Me.TxtReadOnly
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property TextBoxForeColor() As Color
        Get
            Try
                Return Me.TxtForeColor
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Color)
            Try
                Me.TxtForeColor = Value
                Me.TextBox1.ForeColor = Me.TxtForeColor
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property TextBoxBackColor() As Color
        Get
            Try
                Return Me.TxtBackColor
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Color)
            Try
                Me.TxtBackColor = Value
                Me.TextBox1.BackColor = Me.TxtBackColor
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property TextBoxFont() As FontDialog
        Get
            Try
                Return Me.TxtFontDialog
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As FontDialog)
            Try
                Me.TxtFontDialog = New FontDialog
                Me.TxtFontDialog = Value
                If Me.TxtFontDialog.ShowDialog = DialogResult.OK Then
                    Me.TextBox1.Font = Me.TxtFontDialog.Font
                End If
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property TxtCharCasing() As CharacterCasing
        Get
            Try
                Return Me.TxtCharCasing
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As CharacterCasing)
            Try
                Me.TxtCharCasing = Value
                Me.TextBox1.CharacterCasing = Me.TxtCharCasing
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

    Public Property TextBoxPWD() As Char
        Get
            Try
                Return Me.TxtPassChar
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Get
        Set(ByVal Value As Char)
            Try
                Me.TxtPassChar = Value
                Me.TextBox1.PasswordChar = Me.TxtPassChar
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Set
    End Property

#End Region

#Region "Public Function For TextBox"
    Public Function SetTextBoxFont(ByVal FontName As String, ByVal FontSize As Single, ByVal CustomeFontStyle As System.Drawing.FontStyle) As System.Drawing.Font
        Try
            Me.TextBox1.Font = New Font(FontName, FontSize, CustomeFontStyle)
            Return SetTextBoxFont
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Function
#End Region

#Region "Public Event for TextBox"

#End Region

Thanks in Advance
Sibaji


Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
system.stackoverflowexception in system.windows.fo scheidel21 Pro VB.NET 2002/2003 2 May 18th, 2007 12:40 AM
Insert System date and System Time -Form _TextBox cnkumar74 VB How-To 14 February 14th, 2007 10:52 AM
StackOverFlowException Problem chiefouko VS.NET 2002/2003 1 July 20th, 2004 03:06 AM
How to solve "System.Security.SecurityException" li_chang_hua BOOK: ASP.NET Website Programming Problem-Design-Solution 1 June 1st, 2004 07:00 AM



All times are GMT -4. The time now is 09:03 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.