简体   繁体   中英

Windowless ActiveX controls are not supported

I have a C# .NET 2.0 application that loads legacy VB6 modules (which we have not converted yet) which are ActiveX controls (.ocx files) the application loads these from the main C# .NET form via interops.

Since service pack 2 for .NET 2.0 our users have been getting random errors where the application will throw a "Windowless ActiveX controls are not supported" error. The ActiveX controls are not windowless.

This seems to be an issue others have come up against but I have not found a soultion that has worked.

One of the often offered solutions is turn off DEP for the process and I have tried this.

Anyone ever come up against this problem before?

Your problem is related to the use of the controls in MSWLESS.OCX. You may have to replace all the controls used from this OCX with their regular VB equivalents. There are not too many functional differences between the two sets of controls so you may be lucky.

I got rid of my Windowless VB controls a few years ago when problems started to appear. If I remember correctly, I was able to mostly do a search and replace in the .frm files to replace the controls.


Update:

Wow, that really sucks. Is it possible that your Active X controls are actually Windowless? There is a property on a UserControl called WindowLess that makes your control Windowless. Is it set to True for any of your user controls?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM