Results 1 to 5 of 5

Thread: Non-modal forms cannot be displayed ...from an ActiveX dll(err 406)

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    3
    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.

  2. #2
    Member
    Join Date
    Nov 2000
    Location
    Manila, Philippines
    Posts
    51
    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
    Programmers dont byte, they just nibble a bit.

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    3

    Smile

    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.

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    3

    Thumbs up

    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.../Q233/9/97.ASP

  5. #5
    Member
    Join Date
    Nov 2000
    Location
    Manila, Philippines
    Posts
    51
    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
    Programmers dont byte, they just nibble a bit.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width