//---------------------------------------------------------------------------
void __fastcall TForm1::ComboBox1Change(TObject *Sender)
{
String value = ComboBox1->Text
// If the user tried to delete he must not want to change anything.
if (lastkey == '\b' || lastkey == VK_DELETE)
{
lastkey = 0
return
}
lastkey = 0
// 确保使用者没有在中间插入字符
if (ComboBox1->SelStart != value.Length ())
return