I am using the video creator tool but it crashes every time. I am trying to do it the same way as the demo in Tee9New (which works on my system) using a timer. I wonder what do I do wrong.
I am not rotating the plot like the example in Tee9New but programmatically moving a trackbar. Data Points having the same index as the trackbar position or less get a color (default color is background = Hidden points). The followings are the code:
Code: Select all
/////////////////////////////////////////////////////////////
procedure TMyForm.Timer1Timer(Sender: TObject);
begin
if trackbar3.Position < trackbar3.Max then
Begin
trackbar3.Position := trackbar3.Position + 5; // Timer trigger 5 times per second so each second 10 more point will become visible
Application.ProcessMessages;
end;
procedure TMyForm.btnStartAnimation(Sender: TObject);
var
i,cnt : Integer;
delay : Double; //MS
begin
trackbar3.Position := 0;
Application.ProcessMessages;
timer1.Enabled := true; //enabling the timer
Video.StartRecording('c:\temp\test.avi'); // Start recording
while (trackbar3.Position < trackbar3.Max) do // Wait until all point are plotted
Begin
Application.ProcessMessages;
Sleep(500);
end;
timer1.Enabled := false;
Video.StopRecording; // Stop recording
end;
procedure TMyForm.TrackBar3Change(Sender)
begin
// we change the background color here
end;
//////////////////////////////////////////////////////////////////////////////////
**********************************************************************************************
0048738c +000 VideoTest.exe Graphics TBitmap.GetHandleType
00487414 +008 VideoTest.exe Graphics TBitmap.GetPixelFormat
00488421 +011 VideoTest.exe Graphics TBitmap.SetPixelFormat
007b6e49 +02d VideoTest.exe TeeVideo TVideoTool.InitStreamFormat
007b6d04 +02c VideoTest.exe TeeVideo TVideoTool.AddFrame
007b6a9a +046 VideoTest.exe TeeVideo TVideoTool.ChartEvent
0067b166 +032 VideoTest.exe TeEngine TCustomAxisPanel.BroadcastToolEvent
0067bb27 +1f3 VideoTest.exe TeEngine TCustomAxisPanel.InternalDraw
0065a0e4 +11c VideoTest.exe TeeProcs InnerDraw
0065a199 +021 VideoTest.exe TeeProcs TCustomTeePanel.Draw
00659df9 +041 VideoTest.exe TeeProcs TCustomTeePanel.Draw
0065a265 +059 VideoTest.exe TeeProcs TCustomTeePanel.Paint
004defb7 +057 VideoTest.exe Controls TCustomControl.PaintWindow
004dadce +04e VideoTest.exe Controls TWinControl.PaintHandler
004db2fb +03f VideoTest.exe Controls TWinControl.WMPaint
004def50 +010 VideoTest.exe Controls TCustomControl.WMPaint
004d7bd8 +188 VideoTest.exe Controls TControl.WndProc
004dac37 +157 VideoTest.exe Controls TWinControl.WndProc
0065a84c +00c VideoTest.exe TeeProcs TCustomTeePanel.WndProc
004da8b4 +02c VideoTest.exe Controls TWinControl.MainWndProc
0047e9c8 +014 VideoTest.exe Classes StdWndProc
77440974 +016 user32.dll CallWindowProcW
77975c4b +02b ntdll.dll KiUserCallbackDispatcher
77438b77 +00a user32.dll DispatchMessageA
004f821f +083 VideoTest.exe Forms TApplication.ProcessMessage
004f823e +00a VideoTest.exe Forms TApplication.ProcessMessages
00a189e6 +032 VideoTest.exe MyForm 162 +5 TMyForm.Timer1Timer
**********************************************************************************************
Does the size of the plot make any difference?
Please advise how I can solve this problem.
I am using TeeChart version 2015.14.150120. My OS is Vista (32 bits) with service pack 2.
BR
emwamin