COM Automation and Events

thmartinthmartin Member Posts: 90
I created a WinForm App with a COM interface that I use as an Automation in NAV 6 Classic Client.
The App communicates back to NAV through events. That works fine as long as I show the app modal using ShowDialog().
If I show the app modeless by using the Show() method insted the communication back through the events does not work anymore.
I like to do it that way to be able to access NAV when the app is open.

Can anyone suggest what I can look for to make this work?

If this will not be possible I will probably will look at webservices for the backward communication for NAV.
Thomas Martin
NAV Developer

Comments

  • kinekine Member Posts: 12,562
    I do not know, but may be it is something with threads and multi-threaded applications. If NAV is STA (single-threaded model), than running the form non-modally could lead to creating new thread from which the events are fired and thus making problems. Try to look in this direction...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.