troubleshooting Question

How to best use MultiThreading?

Avatar of MiSheps
MiShepsFlag for United States of America asked on
Visual Basic Classic
7 Comments1 Solution230 ViewsLast Modified:
Greetings Experts,

Ok...  here is the problem that I'm having:

I have an application that runs in a continuous loop in conjunction with a second application. The two sister apps run side by side all day long, feeding information back and forth to eachother through DDE. The way that the loop is currently set up is a simple, send information, wait for a response, and for new information to continue, as such...

1) App A, sends a "green light" to App B using DDE communication
2) App B, then receives the "Green Light" message, and processes part a loop 1 time.
3) App B, sets itself to a "red light" (stop) and prepares a message for App A to grab indicating that it has stopped.
4) App A, then processes through a loop of proceedures 1 time, and then
5) App A, stops, and sends a message (Green light) back to App B so that App B can loop again while App A waits again.

Etc, etc, etc.

That part seems to work well... but here is the problem:

While App A is waiting for App B to finish, you can't do anything in App A..... But... I need to be able to. Specifically in App A, I need to be able to click on a hot spot, which then activates and unhides (shows) a sub form of App A, which I need to be able to navigate withouth delay.

So, what I want, is while App A is waiting for App B to send back a message that it is done with its loop, that App A is still able to function,... OR, at least that the sub form of App A is able to function, even though the main part of App A is still waiting for the message back from App B before it continues with its code.

Currently, when you click on the hotspot, it does nothing until App A is in its loop process. And then as soon as App A stops its loop, and App B starts its loop, the sub form of app A is dead in the water as well, until app B is done processing its loop and given control back to App A.

One thing to keep in mind, the time it takes for App A to loop through its processes is only about 2 seconds, as well as App B... (which is what makes it so annoying to keep having to wait for it to get focus back....

Any ideas, or suggestions would be very appreciated!

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros