Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
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
Medium Priority
?
2,207 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 10

Accepted Solution

by:
anv earned 320 total points
ID: 12042448
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

688 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