What's the best way to refresh multiple CVB displays in C# in a multithread acquisition application

Hello,

please imagine the following scenario:
I have an application acquiring images from up to four cameras. Each camera has is it’s own thread where G2Wait is called in a loop. Furthermore each camera has it’s own display, which should be refreshed after G2Wait returned.

What is the way you would recommend for the implementation of the display refreshes. I know how to do in c++ but my c# is a bit rusty. A code example or a snippet would be extremely helpfully as well.

Thank you in advance & keep the finger crossed for match this evening.
Greg

Effectively what you need to do is pass a Refresh request over to the UI thread. In with Forms components (and ActiveX controls are effectively wrapped in forms components) this is done either through the Invoke or BeginInvoke method. Which one you choose depends on whether you want to wait for the processing to be finished (Invoke) - which I guess is not what you’re after - or whether you prefer to trigger the UI processing now and (potentially) synchronize later (BeginInvoke and EndInvoke). If you use anonymous delegates the syntax is as simple as it is straightforward:

myDisplay.BeginInvoke((MethodInvoker)delegate () { myDisplay.Refresh(); });

Tnx a lot,

I will give it a try.
cheers