Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
WinToolBar error after upgrade from .Net 1.1 to 2.0
posted

Hi, 

 I have an application originally writter in VB.Net, under framework 1.1. It has no bugs. But after I upgraded to framework 2.0, I got a strange exception that I don't know how to solve. Here is the detail:

  • Version: Infragistics.Win.UltraWinToolbars.v6.2
  • Error Msg: This property is read-only at runtime.
  • Trace: Infragistics.Win.UltraWinToolbars.ToolBase.set_Key(String value)

The purpose of function that has error is to remove unwanted toolbar buttons. It will run everytime the form opens. This is the code

With CType(Me.MdiParent, Object)
        For Each tool As ToolBase In My_Menu.Tools
              If CType(.mdiMenu, UltraToolbarsManager).Tools.Exists(tool.Key) AndAlso Not IsDBNull(tool.SharedProps.Category) AndAlso Not tool.SharedProps.Category = String.Empty Then
                    .mdimenu.Tools.Remove(.mdimenu.Tools(tool.Key))
                    If CType(.mdimenu, UltraToolbarsManager).Tools.Exists(tool.SharedProps.Category) AndAlso CType(.mdimenu.Tools(tool.SharedProps.Category), PopupMenuTool).Tools.Count = 0 Then
                        CType(.mdimenu.Tools(tool.SharedProps.Category), PopupMenuTool).SharedProps.Visible = False
                    End If
              End If
        Next
 End With

Can anybody tell me what's wrong?

Parents
  • 44743
    Verified Answer
    posted

    I tried running that code and did not see that error. It's strange because the error trace indicates that the problem is in the Key set accessor of ToolBase, but that doesn't seem to be used in the code snippet. I would recommend trying to upgrade to a later version of NetAdvantage to see if it fixes your issue. If not, I would recommend submitting the issue to the support group: http://ko.infragistics.com/gethelp.

Reply Children
No Data