how to save image?
Posted: Sun Jan 12, 2014 11:19 pm
Hi,NarcĂs Calvet,
I want to save image as jpg,but I must click button1 twice. The first click just saves a blank images.I donot know the reason.Codes are:
Good lucks,
Robinson
I want to save image as jpg,but I must click button1 twice. The first click just saves a blank images.I donot know the reason.Codes are:
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
TChart2.ClearChart();
TChart2.BufferedDisplay = true;
TChart2.Legend.Visible = false;
TChart2.Panel.Color = (uint)ColorTranslator.ToWin32(Color.FromArgb(255, 255, 255));
TChart2.Axis.Visible = false;
TChart2.Axis.FastCalc = true;
TChart2.Panel.MarginUnits = TeeChart.EMarginUnits.muPixels;
TChart2.Panel.MarginLeft = 40;
TChart2.Panel.MarginTop = 20;
TChart2.Panel.MarginRight = 150;
TChart2.Panel.MarginBottom = 0;
TChart2.Aspect.View3D = false;
TChart2.AddSeries(TeeChart.ESeriesClass.scFastLine);
TChart2.Series(0).FillSampleValues(100);
TChart2.Export.asJPEG.SaveToFile("d:\\abc.jpg");
}
private void chart()
{
TChart2.Canvas.Rectangle(TChart2.Width + 150, 50, 350, 150);
}
private void TChart2_OnAfterDraw(object sender, EventArgs e)
{
chart();
}
Robinson