1

i used to write this code

if(Edit1->Text != "" && Key == VK_RETURN){
 Edit1->Text = Edit1->Text.Trim();
 Edit2->SetFocus();
} 

and it works just fine, till I used C++ builder Xe6. the ding sound come up each time I press Enter button. any help?

nashwa
  • 221
  • 1
  • 2
  • 17

1 Answers1

1

The beep sound is the default behavior on your IDE. Try:

if(Edit1->Text != "" && Key == VK_RETURN){
    Key=0;
    Edit1->Text = Edit1->Text.Trim();
    Edit2->SetFocus();
} 

Alternate solution: How to turn off beeping when pressing ENTER on a single-line EDIT control under Windows CE?

Community
  • 1
  • 1
erol yeniaras
  • 3,701
  • 2
  • 22
  • 40