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:
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?
Thank you for your reply.
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.