Bonjour a tous, j'ai écrit un prg en bcb6 utilisant le Tcomport qui marchait bien jusqu'a l'achat d'un nouveau modem sms qui ne transmet plus l'heure et la date du message.
A quel moment puis je inserer la date et heure (du pc) pour notifier la réception du sms.
//-----------------------------------------------------------------------
void __fastcall TForm1::ComPortRxChar(TObject *Sender, int Count)
{
AnsiString strx;
char t,*tt;
int lon;
ComPort->ReadStr(Str, Count);
strx=Str;
lon=strx.Length();
t=strx[lon];
//*tt=t;
if ((t =='\x1A' ) || (t =='\r'))
{
Str=Trim(Str)+'\r'+'\n';
}
Memo1->Text = Memo1->Text + Str;
Memo1->Perform(WM_VSCROLL, SB_BOTTOM, 0);
}
//---------------------------------------------------------------------------
D'avance merci
Partager