Click to See Complete Forum and Search --> : Non-modal forms cannot be displayed ...from an ActiveX dll(err 406)
DGvbforum
Feb 8th, 2001, 10:36 PM
I just joined this project and found the following error:
Non-modal forms cannot be displayed in this host application from an ActiveX DLL
(Error 406)
The application instanciates an ActiveX.exe which manages the data collection for a report. The x.exe then uses a print manager .dll to create a pdf etc. The progress form in this dll is non-modal, and this is apparently the problem.
Please help with the big picture as to why this architecture is not working.
Thank you for any assistance or reference pointers.
jonaxse
Feb 9th, 2001, 02:30 AM
oh well, seems VB is your master. :)
If he doesn`t want it, then don`t force it to.
There are work-arounds tho`. If you have the code for the "printing" dll.
You have to enable Events, if not, then callback procedures... However, I recommend event notification.
here is the picture:
1.> As the DLL processes data... it should raiseevents regarding its progress.
2.> You need to process these events in your main program... of course, you can show non-modal forms in your main program --- so you do the progress code here.
3.> This way, your DLL/EXE dont have to show anything at all :)
DGvbforum
Feb 9th, 2001, 11:11 AM
Thank you for the good suggestion, jonaxse. If you know any resources for explaining what is going on, that is what I hope to learn through this. Its the "give a fish to a person and he eats for a day, teach a person to fish and he eats for a lifetime" deal.
Again, Thanks.
DGvbforum
Feb 9th, 2001, 04:30 PM
Found the issue. The article references MTS as the environment, but apparently the same thing is happening in 2000.
c.f.
http://support.microsoft.com/support/kb/articles/Q233/9/97.ASP
jonaxse
Feb 10th, 2001, 06:13 AM
hmmm... I thought you knew the saying:
"...Give a man a fish, and he eats for a day. Teach him the internet and he won`t bother you for weeks." --- http://www.hicards.com
Anyway... Thanks. I learned a lot from you today :D
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.