's picture

Issue while running Multiple window - Few windows are hanging and not running smoothly.

I have a custom a custom contol as shown below

public class MultiStripChartGL : GLControl

I use this for plotting a graph on the form. The issue is that when I create multiple instance of this control in run time and drag and drop values to it to run those params ( that's how i designed to plot the graph), it works for 1 or 2 instances. The moment the number of instance increase to 4 to 5 only last 2 charts are running smoothly. Rest are actually hangs a lot...

I wrote the following things....
1) I wrote the following lines at the beginning and end of the OnPaint method and resize event

2) Added the below code in the load

this.Context.VSync = true;

These two improves the performance but still the first few windows out of all 5 windows are running so slowly or having hanging.. Please help. Its very urgent....