Zhan Weiming
2008-07-28 07:54:04 UTC
Hi there,
In my application, I don't want to user to add new line in the Tmemo
control.
Below are the codes,
void __fastcall TForm1::MemoKeyPress(TObject *Sender, char &Key)
{
if(Key == VK_RETURN)
Key = ' ';
}
the key <return> is replaced with ' '. Actually, I want to make the effect
like users have not input anything at all. Does Key = '\0' work?
Thanks,
Zhan
In my application, I don't want to user to add new line in the Tmemo
control.
Below are the codes,
void __fastcall TForm1::MemoKeyPress(TObject *Sender, char &Key)
{
if(Key == VK_RETURN)
Key = ' ';
}
the key <return> is replaced with ' '. Actually, I want to make the effect
like users have not input anything at all. Does Key = '\0' work?
Thanks,
Zhan