how do i get class initialize to wait for active x exe to load 
Author Message
 how do i get class initialize to wait for active x exe to load

using VB6 i have created an active x server (exe) that
loads a complex form from sub main, taking a sec or two
to load.
when i create an instance of the server from a client
application and immediately try to set a property i get
an error because the server has not finished loading.
is there an easy way to make the client wait till the
server is finished loading before proceeding to set it's
properties?


Wed, 14 Jul 2004 17:52:52 GMT  
 how do i get class initialize to wait for active x exe to load
On Sat, 26 Jan 2002 01:52:52 -0800, "Mario Michela"

Quote:

>is there an easy way to make the client wait till the
>server is finished loading before proceeding to set it's
>properties?

Why not have the EXE raise an event as soon as its loading is
complete, and catch that event on the client?

James



Wed, 14 Jul 2004 20:20:09 GMT  
 how do i get class initialize to wait for active x exe to load
I could be wrong here, but I think I have something to offer.

Since your object is an ActiveX Executable, it's running OOP (Out of
process).
Because of that, you're calling app continues happily along it's own thread.

The previous response is correct in having your ActiveX exe raise an event.

Another would be to have a property called something like "LoadState" or
"State" or "Ready"

When accessed, the state would confirm whether it was ready to be set by
returning a boolean.

Then, in your code:

    set myObj = createobject("myclass.stuff")

    do while not myObj.Ready

        DoEvents()

    loop

Hope this helps!

Chris


Quote:
> using VB6 i have created an active x server (exe) that
> loads a complex form from sub main, taking a sec or two
> to load.
> when i create an instance of the server from a client
> application and immediately try to set a property i get
> an error because the server has not finished loading.
> is there an easy way to make the client wait till the
> server is finished loading before proceeding to set it's
> properties?



Mon, 19 Jul 2004 00:25:15 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Difference between: Active X EXE with a class marked SingleUse vs MultiUse

2. SSTAB loading with controls at run time LOAD() vs INITIALIZE()

3. Userdoc - Active X EXE as apposed to Active X DLL

4. Userdoc - Active X EXE as apposed to Active X DLL

5. Userdoc - Active X EXE as apposed to Active X DLL

6. how to wait till DOS shell prog is done

7. Intranet Development... Done Waiting

8. How do you make a script wait whilst something is being done

9. Wait Until Function is done ?

10. standard EXE / active EXE with html?

11. Wait until done "thinking"?

 

 
Powered by phpBB® Forum Software