private void CaptureFullScreen (NinjaTrader.Gui.Chart.ChartControl chart)
{
if (chart.ParentForm.WindowState == FormWindowState.Minimized)
{
Print ("Chart form window state must be maximized or normal to capture. Chart not saved.");
return;
}
System.Drawing.Bitmap bmp = new System.Drawing.Bitmap(chart.ChartPanel.Width,
chart.ChartPanel.Height, PixelFormat.Format16bppRgb555);
chart.ChartPanel.DrawToBitmap(bmp, chart.ChartPanel.ClientRectangle);
string FileName =”Test.png”;
bmp.Save(FileName, ImageFormat.Png);
}
Ninja Trader 8 errors are below
How will these errors be solved in Ninja trader 8 ? Am I required to add any assembly reference here ?
Error 1:
‘ NinjaTrader.Gui.Chart.ChartControl ‘ does not contain a definition for ‘ParentForm’ and no extension method ‘ParentForm’ accepting a first argument of type ‘NinjaTrader.Gui.Chart.ChartControl’ could be found (are you missing a using directive or an assembly reference?)
Error 2:
‘ NinjaTrader.Gui.Chart.ChartControl ‘ does not contain a definition for ‘ChartPanel ‘ and no extension method ‘ChartPanel’ accepting a first argument of type ‘NinjaTrader.Gui.Chart.ChartControl’ could be found (are you missing a using directive or an assembly reference?)
Comment