Results 1 to 2 of 2

Thread: activex EXE Help?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2004
    Posts
    308

    activex EXE Help?

    Hi,

    Got a quick Question if anyone can help?

    I have a HUB type Exe that spawns 10 ActiveX EXE's (thread per object) with events.

    For example:
    I have a routine that calls Print and it selects an object (one of the 10) and issues a print statement.

    So my routine does things, selects the object, calls print on the object and carries on.

    My problem is that the even is coming back from the object. In the event Handler there is other code. This is getting executed on that object BEFORE my PRINT calling code has finished?

    Is there a way to prevent this ?

    Thanks

    Chub

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Re: activex EXE Help?

    It would seem you either need a form of delay before passing back control, or you need to hand off execution entirely and let other processes manage background tasks taking no further concern in them.

    For the first way, you can implement some form of loop with a DoEvents included in it - similar to "Do while activeXEXENumber1 is still open".

    The second way would be for a database to store and keep track of all the items requiring processing - for example the list of 10 items to be printed. Your app would write the database entries instead of calling the exe instances, and play no further part in processing them. A separate program or Windows service could then poll the database, pickup requests and process them separately.

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

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