I had a little problem dealing with this error. It's raised when i run the application on another pc.But the program works entirely perfect except at two places when closing the forms.

Before getting this error I had another error that says:

An error occured creating the form. Something realted to visual basic powerpacks.

So I searched over the internet and found two options. First is to go to the references and select the powerpack and change the copy local to true. But I could not find the reference in my project so I moved to the next option that is to install the power pack on the target pc.

Doing that the first error went away.But when I try to close or save a work, say click the save button this error is raised.

In the exception text I get this text which is again related to the power packs.

************** Exception Text **************
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.List1.Enumerator.MoveNextRare() at System.Collections.Generic.List1.Enumerator.MoveNext()
at Microsoft.VisualBasic.PowerPacks.ShapeCollection.Dispose(Boolean disposing)
at Microsoft.VisualBasic.PowerPacks.ShapeContainer.Dispose(Boolean disposing)

But everything is fine on my development pc.

Any thoughts on that

2 Years
Discussion Span
Last Post by Nebil

I forgot to mention that I was using the line shape. When I removed it from the two forms it works fine.
How do I deal with the line shape if I were to use it on my form?

Thank you!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.