locked
Apps loosing ActiveX messages RRS feed

  • Question

  • We've developed some ActiveX controls so that developers that like to use them/have to use them to integrate with our software can do so. We have some instances, primarily FoxPro systems, are loosing events we fire when they have modal dialogue boxes active. It seems that when they have code that pops up a modal dialogue box, most often a simple message dialogue showing a user error, they loose the events we post to their window. We've found that if you can use a modeless dialogue, this does not happen but the application developers either can't always create a modeless dialogue or are not willing to do so.

     

    My question then is, what can we do in our ActiveX code to make sure that the messages are not lost? At the very low layer our code is multithreaded but we queue the messages up an post them to the application window's queue as a custom user message.

     

    We don't seem to be seeing this problem with our in-house software using VB, but I would like to make our ActiveX smarter so that I can protect other applications from having problems with loosing messages.

    Wednesday, June 4, 2008 3:45 PM

Answers

  • A bit of clean-up. This was found to be an issue with FoxPro. When the programmer pops up a modal dialog box to show some information or get a response from the user, the messages sent to the application are lost. There is no work around other than not popping up modal dialog boxes.

    I'll mark this as answered.
    • Marked as answer by Wasabi_Sushi Wednesday, February 11, 2009 6:51 PM
    Wednesday, February 11, 2009 6:50 PM

All replies


  • I suspect that you will get a better answer from the developer forums that you are likely to here.

    In answer to your question from an architecture perspective, ActiveX isn't the only way that you can allow people to extend a system.  You should perhaps research a pluggable architecture, something that may well involve a provider pattern, so a strategy pattern and a factory pattern used in conjuction.

    From my very limited knowledge of ActiveX, it doesn't work well with .NET if that is what you're using, and from memory is intended only really to be used for internet based applications.  So from that perspective, the technology, I would say is probably not a popular one any more.

    You may need to keep the technology if you're using VB6, and for legacy reasons, as you say with older version of FoxPro, in which case I would be of limited help to you, and I would suggest posting in the FoxPro or VB forums to get a much more complete answer.

    Good luck,

    Martin Platt.
    Wednesday, June 4, 2008 10:32 PM
  • I know there are more ways than ActiveX to expose access to lower layer API's. The reason we have an ActiveX is that, for many developers using VB, FoxPro, and other platforms, it is what they are familiar with and easier to work with than having to teach them how to call native code from their app. I'm not a big fan of ActiveX but for some, it is the only way we can get them to integrate with our software.

     

    I'll see what response I can get off a developers' forum.

     

    I guess my architecture question would be what happens to the message queue? Does it lave limited length so once the queue reaches a certain size, messages are purged? It seems odd to me that if it were a proper queue, the messages wouldn't get lost or discarded.

     

    Thursday, June 5, 2008 12:38 PM
  • A bit of clean-up. This was found to be an issue with FoxPro. When the programmer pops up a modal dialog box to show some information or get a response from the user, the messages sent to the application are lost. There is no work around other than not popping up modal dialog boxes.

    I'll mark this as answered.
    • Marked as answer by Wasabi_Sushi Wednesday, February 11, 2009 6:51 PM
    Wednesday, February 11, 2009 6:50 PM