Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

main thread is busy, cannot receive callbacks

Hi,

I'm using the measurement studio activeX control to program my application. (NI-DAQ 6071E) My main thread is always busy because there's a lot of calculating and graphing. I'm using the CWAI control to do continuous caputuring. When the program is very busy for displaying the data, it will miss the callbacks or give error. My question is, is it possible to create measurement studio controls in a worker thread, so that the callbacks will be recieved in the worker thread? If not possible, is there any work around? I tried to use windows messageas to get around. The program is it still need to go through the main thread. The bottom line is callbacks cannot have anything to do with main thread. Thank you.

Dona
ld Yeung
Software Engineer
Tensor Biosciences
0 Kudos
Message 1 of 3
(3,393 Views)
Hello

Check out the following links, they wont give you the answer directly, but its a start:

http://www.vbug.co.uk/vbug99/multithread.doc

http://www.carobit.com/Feedback/ShowThread.asp?ThreadNumber=20010402084949Pino%20Carafa

http://www.microsoft.com/msj/defaultframe.asp?page=/msj/0897/multithreading.htm&nav=/msj/0897/newnav.htm

Hope this helps

Bilal Durrani
NI
Bilal Durrani
NI
0 Kudos
Message 2 of 3
(3,393 Views)
In general, free threading in Visual Basic 6 is not supported. If you can't take no for an answer, though, check out Chapter 13 of Advanced Visual Basic 6 : Power Techniques for Everyday Programs.

Another option would be to upgrade to VB.NET. For more information, see HOW TO: Create Threads in Visual Basic .NET and INFO: Roadmap for Threading in Visual Basic .NET.

- Elton
0 Kudos
Message 3 of 3
(3,393 Views)