vb.net - InvalidArgument=Value of '0' is not valid for 'SelectedIndex'. Parameter name: SelectedIndex using ShowDialog -
i have vb6 project have converted on .net using visual studio 2008. have code uses showdialog. code worked fine in vb6. in vs 2008 code doesn't throw error during build or compile. error @ run time, error:
an error occurred creating form. see exception.innerexception details. error is: invalidargument=value of '0' not valid 'selectedindex'. parameter name: selectedindex
this code error thrown on:
frmaddmethod.showdialog()
the call stack:
prjdrawsafe.exe!prjdrawsafe.frmmain.cmdadddrawing_click(object eventsender = {text = "add drawing"}, system.eventargs eventargs = {x = 59 y = 8 button = system.windows.forms.mousebuttons.left}) line 60 basic
can please tell me how fix error code work in .net/?
one of controls on converted form has selectedindex property set 0 not supported in .net. there couple of ways sort out:
search 'generated form designer code' (or whatever name is) region selectedindex property of control , fix one(s) zero.
manually select each control in form designer , check selectedindex property, change zero.
Comments
Post a Comment