throw an InvocationTargetException target exception

ideiafix

New member
Joined
Aug 18, 2010
Messages
1
Programming Experience
Beginner
Hi to everyone!

This is my first post, and I really need you help.

I have a visual Basic .net 2010 in fw4

In developement environment works all perfect, but when I pass the app to client computer, gives the following error:

throw an InvocationTargetException target exception

And the code breaks here:
Public FormsApps As New List(Of Form)

FormsApps.Clear()

        For Each t As Type In Me.GetType().Assembly.GetTypes()
           If t.BaseType.Name = "Form" Then
                   Application.DoEvents()
                   FormsApps.Add(CType(Activator.CreateInstance(t), Form))
                   Application.DoEvents()
                End If
        Next

My ideia is to list all the forms existing in the application.

Can you help me?
 
What exactly are you trying to achieve? If we know that then I suspect that we could provide a better option for doing it.

As for the exception, that means that a secondary thread threw an exception so you would have to check the stack trace for that original exception.
 

Latest posts

Back
Top