My software Teechart version is "Teechart Pro v2011.03.30407".
My application request to save a new chart as BMP file when a new point series or lin series was drawn in chart .But the BMP file saved using function "SaveToBitmapFile" is all the same. I don't know how to solve this problem ,very very urgent ! Who can help me,Thank you. I'd appreciate it.
problem of "SaveToBitmapFile function"
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: problem of "SaveToBitmapFile function"
Hi sjsun116,
Thanks in advance.
Current version is v2011.04 and v2012.05 will be published very soon. You might be interested in testing the latest version.My software Teechart version is "Teechart Pro v2011.03.30407"
What do you exactly mean with this, could you please provide more detailed information? A simple example project we can run "as-is" to reproduce the problem here would also be helpful.But the BMP file saved using function "SaveToBitmapFile" is all the same.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: problem of "SaveToBitmapFile function"
Hi Narics,
Thank you.
A question:are these version compatible?
An example(BCB 6.0) such as:
AnsiString ToName;
DateSeparator = '-';
ShortDateFormat = "yyyy/mm/dd";
ToName = DateToStr(Date());
ShortDateFormat = "hh/mm/ss";
ToName = "2D-"+ToName+"-"+DateToStr(Time());
SaveDialog1->FileName = ToName;
if (SaveDialog1->Execute())
{
if (FileExists(SaveDialog1->FileName))
{
DeleteFile(SaveDialog1->FileName);
}
Chart1->SaveToBitmapFile(SaveDialog1->FileName);//chart1 is a Chart Unit
}
This example show how to capture and save the chart picture,when I draw line or point and so on in Chart1.
but I can't get the changed chart picture.
Thank you.
A question:are these version compatible?
An example(BCB 6.0) such as:
AnsiString ToName;
DateSeparator = '-';
ShortDateFormat = "yyyy/mm/dd";
ToName = DateToStr(Date());
ShortDateFormat = "hh/mm/ss";
ToName = "2D-"+ToName+"-"+DateToStr(Time());
SaveDialog1->FileName = ToName;
if (SaveDialog1->Execute())
{
if (FileExists(SaveDialog1->FileName))
{
DeleteFile(SaveDialog1->FileName);
}
Chart1->SaveToBitmapFile(SaveDialog1->FileName);//chart1 is a Chart Unit
}
This example show how to capture and save the chart picture,when I draw line or point and so on in Chart1.
but I can't get the changed chart picture.
Re: problem of "SaveToBitmapFile function"
Hi,
I'm not sure to understand the exact problem either.
I've added a Chart and a TLineSeries with some values at design time, in a new C++Builder application. I've also doped a Button to the form and then used your code just adding a point, and it seems to work fine for me here:
If you still have problems with it, please try to arrange a simpl example project we can run as-is to reproduce the problem here.
Thanks in advance.
I'm not sure to understand the exact problem either.
I've added a Chart and a TLineSeries with some values at design time, in a new C++Builder application. I've also doped a Button to the form and then used your code just adding a point, and it seems to work fine for me here:
Code: Select all
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Chart1->Series[0]->Add(100);
AnsiString ToName;
DateSeparator = '-';
ShortDateFormat = "yyyy/mm/dd";
ToName = DateToStr(Date());
ShortDateFormat = "hh/mm/ss";
ToName = "2D-"+ToName+"-"+DateToStr(Time())+".bmp";
SaveDialog1->FileName = ToName;
if (SaveDialog1->Execute())
{
if (FileExists(SaveDialog1->FileName))
{
DeleteFile(SaveDialog1->FileName);
}
Chart1->SaveToBitmapFile(SaveDialog1->FileName);//chart1 is a Chart Unit
}
}
Thanks in advance.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: problem of "SaveToBitmapFile function"
Hi,
I upload a test file developed using C++builder 6.0. Please download three part and then decompress .
The test have three button:draw1,draw2 and ScreenShot.When you click the button "draw1" or the button "draw2",it will draw picture 1 or picture 2.
when you click the button "ScreenShot",it will capture the chart picture.
The problem :
when you click the button "ScreenShot" after "draw1",you will get the picture1.But afterwards you click the button "ScreenShot" after "draw2",you can't
get the picture2.
when you click the button "ScreenShot" after "draw2",you will get the picture2.But afterwards you click the button "ScreenShot" after "draw1",you can't
get the picture1.
How can I get the changed chart picture?
Thanks in advance.
I upload a test file developed using C++builder 6.0. Please download three part and then decompress .
The test have three button:draw1,draw2 and ScreenShot.When you click the button "draw1" or the button "draw2",it will draw picture 1 or picture 2.
when you click the button "ScreenShot",it will capture the chart picture.
The problem :
when you click the button "ScreenShot" after "draw1",you will get the picture1.But afterwards you click the button "ScreenShot" after "draw2",you can't
get the picture2.
when you click the button "ScreenShot" after "draw2",you will get the picture2.But afterwards you click the button "ScreenShot" after "draw1",you can't
get the picture1.
How can I get the changed chart picture?
Thanks in advance.
Re: problem of "SaveToBitmapFile function"
Hi sjsun116,
I could reproduce it with v2011.03 but it seems to work fine in v2011.04 and the current v2012.05.
Could you please give it a try?
I could reproduce it with v2011.03 but it seems to work fine in v2011.04 and the current v2012.05.
Could you please give it a try?
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: problem of "SaveToBitmapFile function"
Hi,
OK,Thank you very much.
OK,Thank you very much.