Solved

Run-time error '406': Non-modal forms cannot be displayed in this host application from an ActiveX DLL, ActiveX Control, or Property Page.

Posted on 2004-09-13
1
2,121 Views
Last Modified: 2012-08-14
If this is the wrong Topic, pls inform me !

I have a Gupta-Program, in which I call a VB-Dll I've got from a friend
The Program looks like

Variables:
    COM Proxy Class: Advanced_Function
    Boolean: bOk
Actions:
    Set bOk = w_AdvancedFunction.Create(  )
    Set bOk = bOk AND w_AdvancedFunction.mFormShow(  )

On FormShow I get the Error "Run-time error '406': Non-modal forms cannot be displayed in this host application from an ActiveX DLL, ActiveX Control, or Property Page at line 5".

My friend told me the dll works fine when calling it from a Visual-Basic or a VC++ -Program.
Can anybody tell me, where this error comes from, and how can I change my Program ( or my friend can change his dll) so that it works ?

Thx in advance


0
Comment
Question by:PetraG
1 Comment
 
LVL 10

Accepted Solution

by:
anv earned 80 total points
Comment Utility
when u open the form where u r using this dll
make that form non modal...

say in my App... form1 uses the above dll...
and this form has a code that open the form of the dll...which is non-modal

so when u open form1.. u open it as non-modal.
like

form1.show vbModeless

u wont get the error
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now