Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

CWUI Components "hogging" Processor Time

We are working on a project where we need to service data coming in on a serial port relatively quickly. Every byte that comes in on the port must be acknowledged within 40ms. When a "large" CWGraph is displayed in VB6, or when one of the CWButtons is pressed, our comms thread is blocked for up to 200ms which kills our communications.

Has anyone found a way to prevent the CWUI components threads from blocking other threads for long periods such as this. We have been "messing" with process & thread priorities with no good results. Our development systems are most likely considerably faster than end-user systems will be, so this problem can only get worse unless we find a way to get processor time to the comms
thread when we need it.

Any comments, suggestions etc... would be greatly appreciated. Offerings of sympathy would also go a long way toward getting through the day......
0 Kudos
Message 1 of 3
(3,726 Views)
Multithreading in VB:
It's technically possible to manually implement multithreading in VB, but pretty painful. The best information on how to
do this can be found in the book "Advanced Visual Basic 6: Power Techniques
for Everyday Programs" by Matthew Curland: http://www.powervb.com/
A thorough discussion on VB's support for threading can be found here: http://www.vbaccelerator.com/codelib/article/thr_hist.htm

My sympathy is yours.
0 Kudos
Message 2 of 3
(3,726 Views)
Have you tried setting CWGraph.ImmediateUpdates or CWButton.ImmediateUpdates to False? DoEvents may be beneficial in certain places in you code.
0 Kudos
Message 3 of 3
(3,726 Views)