Flickering unsynced image on drawing canvas in BCB6
Hi there,
I have been using BCB5 and its predecessors for a long time.
Now I switched over to BCB6 and ran into a strange problem which do not
occur in the predecessors of BCB6.
I am updating the my form several times a second. On the update the form
is not stable. I'm getting horizontal stripes. Also the response when
switching back to from one window to another could take a long time.
Even the buttons were white and the program did not repond for a long time.
Because the program is some milion lines, the problem is not easy to tackle.
What I found out is that the update of the window output is different in
this version.
The sample code is below:
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
//---------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Timer1->Enabled=true;
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
Graphics::TBitmap *pBitmap = new Graphics::TBitmap();
pBitmap->LoadFromFile("C:\\Program Files\\Common Files\\Borland6
Shared\\Images\\Splash\\256color\\factory.bmp");
Form1->Image1->Canvas->Draw(0,0,pBitmap);
delete pBitmap;
In BCB5 and its predecessors the window output is clear, the image is
clear. In BCB6 the drawing of the image is visible, like I said as
stripes, these stripes have the background color.
Did anyone ran in this kind of problems?!
I'm using BCB5 prof, BCB6 Personal (Iwant to try before buy an update)
The OS is Win2k SP2
Tnx
Ben