|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Inability to trap form.show eventI have a rather simple form that takes a user name and password,
validates it, and loads another form. All this is done in the click event for the one and only button on the form. Everything works fine except that after the event is finished the form breaks because of an unhandled system.argument exception, and highlights the form class declaration. This only happens when I do the form.show command in the click event. When I comment it out I do not get the exception. The strange thing is that I get the exception even when I use a try - catch block. I know it is the form.show() that is the problem as commenting that out, regardless of the try-catch block, prevents the exception. If I can figure out what exactly is causing the exception I could probably figure this out on my own. I know that the try-catch system is working as it has caught other problems. Marc Marc the Demi-Programmer wrote:
Show quoteHide quote > I have a rather simple form that takes a user name and password, Something I neglected to mention is that when I step through with the > validates it, and loads another form. All this is done in the click > event for the one and only button on the form. Everything works fine > except that after the event is finished the form breaks because of an > unhandled system.argument exception, and highlights the form class > declaration. This only happens when I do the form.show command in the > click event. When I comment it out I do not get the exception. The > strange thing is that I get the exception even when I use a try - catch > block. I know it is the form.show() that is the problem as commenting > that out, regardless of the try-catch block, prevents the exception. If > I can figure out what exactly is causing the exception I could probably > figure this out on my own. I know that the try-catch system is working > as it has caught other problems. > > Marc debugger it seems to process the show() command appropriately. However, I still get the exception if and only if the show() command is used. Marc Create two separate new forms, and call one from the other. Then compare why
this one works, and yours doesn't Jeff Show quoteHide quote "Marc the Demi-Programmer" <no@address> wrote in message news:uc84gIMXGHA.2376@TK2MSFTNGP03.phx.gbl... >I have a rather simple form that takes a user name and password, > validates it, and loads another form. All this is done in the click > event for the one and only button on the form. Everything works fine > except that after the event is finished the form breaks because of an > unhandled system.argument exception, and highlights the form class > declaration. This only happens when I do the form.show command in the > click event. When I comment it out I do not get the exception. The > strange thing is that I get the exception even when I use a try - catch > block. I know it is the form.show() that is the problem as commenting > that out, regardless of the try-catch block, prevents the exception. If > I can figure out what exactly is causing the exception I could probably > figure this out on my own. I know that the try-catch system is working > as it has caught other problems. > > Marc It would be helpful if you showed the code and the full text of the
exception including a stack trace. It will be easier to determine what is happening. Chris Dunaway wrote:
> It would be helpful if you showed the code and the full text of the I figured out kind of what was going on. The exception was happening in > exception including a stack trace. It will be easier to determine what > is happening. > a custom control in the form being called. Once I managed to figure out how to do the debugging in the two projects I managed to fix the issue. I do appreciate all of your help, not just the person on whose post I am replying. Marc
SQL query on Datatables [VB 2005]
Disable objectdatasource-control Class Instantiation Data Access Application Block Creating Multiple Listviews in Code scope - integer Open Excel file with ASP.Net Add new items to combobox after the datasource is set DrawString with Hotkey Character Underlined docking in vb |
|||||||||||||||||||||||