bool
ContainerWindow::FocusNextControl()
{
  Window *focused = GetFocusedWindow();
  if (focused != NULL) {
    Window *control = FindNextControl(focused);
    if (control != NULL) {
      control->SetFocus();
      return true;
    } else
      return FocusFirstControl();
  } else
    return FocusFirstControl();
}
}
//---------------------------------------------------------------------------------------------------------------------------
void __fastcall TFrBlockProduceCost::WithDiscEdKeyPress(TObject *Sender, System::WideChar &Key)
{
 if ((Key >= '0') && (Key <= '9'))
	  return;

 if (Key == FormatSettings.DecimalSeparator)
	{
	 if ((WithDiscEd->Text).Pos(FormatSettings.DecimalSeparator) != 0)
		  Key = 0;
		  return;
	 }

  if (Key == VK_BACK)
	  return;

  if (Key == VK_RETURN)
	  FindNextControl((TWinControl *)Sender, true, true, false)->SetFocus();