Hi everybody,
I'm using this code to invoke animated cursor in C++ builder:
void __fastcall TcfListatArtikujtLst::FormActivate(TObject *Sender)
{
ActiveControl = cxGrid1;
Application->ProcessMessages();
const int cnCursorID1 = 1;
Screen->Cursors[cnCursorID1] = LoadCursorFromFile("cursors\\hourglas.ani");
Cursor = cnCursorID1;
try
{
dmDM1->prcArtikujt->Close();
dmDM1->prcArtikujt->Parameters->Refresh();
dmDM1->prcArtikujt->Prepared;
dmDM1->CDSArtikujt->Data = dmDM1->DSPArtikujt->Data;
dmDM1->CDSArtikujt->Open();
}
__finally
{
Screen->Cursor = crDefault;
}
}
Problem is that animation takes effect atre try-finally block and doesn't retun do default cursor.
Cheers, Nijazi Citaku