470,602 Members | 1,572 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,602 developers. It's quick & easy.

Invalid ActiveX State Exception

I am trying to edit form elements (labels, text box's, etc) in Visual Studio.NET using VB.NET. Whenever I edit certain forms’ appearance whether it is through the code, or through the designer, I receive this (Invalid ActiveX State Exception) error message at runtime whenever the form is called. I am simply trying to change the size and location of some form elements whose location and size were thrown off during the upgrade from VB6.0 to VB.NET. These are not major changes, just a few pixels at most. In addition, after I get this error, the form that I tried to edit is hosed. It throws this runtime error even if I reverse the changes that I made to the form. It is as if something is changing that is not visible. I make sure that everything in the code is changed back to its original state, but still receive this error message. Any suggestions are greatly appreciated.

Nov 20 '05 #1
3 6665
Are you using any non .Net controls, such as ActiveX?
I have had this exact problem in this case.
Has to do with the forms Property Bag being different between .Net and VB6.

Gerald

"Evan Delodder" <de********@yahoo.com> wrote in message
news:49**********************************@microsof t.com...
I am trying to edit form elements (labels, text box's, etc) in Visual Studio.NET using VB.NET. Whenever I edit certain forms' appearance whether it is
through the code, or through the designer, I receive this (Invalid ActiveX State
Exception) error message at runtime whenever the form is called. I am simply
trying to change the size and location of some form elements whose location and
size were thrown off during the upgrade from VB6.0 to VB.NET. These are not
major changes, just a few pixels at most. In addition, after I get this error,
the form that I tried to edit is hosed. It throws this runtime error even if I
reverse the changes that I made to the form. It is as if something is changing
that is not visible. I make sure that everything in the code is changed back to
its original state, but still receive this error message. Any suggestions are
greatly appreciated.

Nov 20 '05 #2
I am using listviews, dropdown lists, toolbars and some other stuff too. What can I do to fix this problem, or at least make it go away peacefully? Thanks for your response and I appreciate any further help you can provide.

Evan

"Cablewizard" wrote:
Are you using any non .Net controls, such as ActiveX?
I have had this exact problem in this case.
Has to do with the forms Property Bag being different between .Net and VB6.

Gerald

"Evan Delodder" <de********@yahoo.com> wrote in message
news:49**********************************@microsof t.com...
I am trying to edit form elements (labels, text box's, etc) in Visual

Studio.NET using VB.NET. Whenever I edit certain forms' appearance whether it is
through the code, or through the designer, I receive this (Invalid ActiveX State
Exception) error message at runtime whenever the form is called. I am simply
trying to change the size and location of some form elements whose location and
size were thrown off during the upgrade from VB6.0 to VB.NET. These are not
major changes, just a few pixels at most. In addition, after I get this error,
the form that I tried to edit is hosed. It throws this runtime error even if I
reverse the changes that I made to the form. It is as if something is changing
that is not visible. I make sure that everything in the code is changed back to
its original state, but still receive this error message. Any suggestions are
greatly appreciated.


Nov 20 '05 #3
Hmm...
You don't say if these are legacy ActiveX or not.
If it is a .Net issue, then there might be a code answer or tinkering with the
forms resource file.
In my case, I was having problems during design-time more than run-time.
Although if I tried to access the ActiveX control while the form is not
displayed at run-time, then it would also crash.
In the end, I had to remove all the ActiveX controls and associated Interop
references.
I then needed to manually import the type libraries using TLBIMP to recreate the
Interop libraries.
Then re-add the references and controls.
Even in that case, it did not solve the problem for all the controls, but it did
for most of them.

I'm sure that is not the answer you were looking for, and in fact there may be a
better way, but I have yet to find it.
Hope this provides some help.

Gerald

"Evan Delodder" <de********@yahoo.com> wrote in message
news:40**********************************@microsof t.com...
I am using listviews, dropdown lists, toolbars and some other stuff too. What can I do to fix this problem, or at least make it go away peacefully? Thanks for
your response and I appreciate any further help you can provide.
Evan

"Cablewizard" wrote:
Are you using any non .Net controls, such as ActiveX?
I have had this exact problem in this case.
Has to do with the forms Property Bag being different between .Net and VB6.

Gerald

"Evan Delodder" <de********@yahoo.com> wrote in message
news:49**********************************@microsof t.com...
I am trying to edit form elements (labels, text box's, etc) in Visual

Studio.NET using VB.NET. Whenever I edit certain forms' appearance whether it is through the code, or through the designer, I receive this (Invalid ActiveX State Exception) error message at runtime whenever the form is called. I am simply
trying to change the size and location of some form elements whose location and size were thrown off during the upgrade from VB6.0 to VB.NET. These are not
major changes, just a few pixels at most. In addition, after I get this error, the form that I tried to edit is hosed. It throws this runtime error even if I reverse the changes that I made to the form. It is as if something is changing that is not visible. I make sure that everything in the code is changed back to its original state, but still receive this error message. Any suggestions are greatly appreciated.


Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Michael Schutte | last post: by
1 post views Thread by wang xiaoyu | last post: by
2 posts views Thread by Hope Paka | last post: by
reply views Thread by birdinhand | last post: by
2 posts views Thread by none | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.