Stack Overflow Asked on December 28, 2020
Sorry for my poor English.
I wanna disable ‘Beep’ sound in textbox.
I tried like below.
private void TextBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (((TextBox)sender).Text.Length == ((TextBox)sender).MaxLength)
{
e.Handled = true;
}
}
this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBox_KeyPress);
It works, but editing text is also disabled after maxlength is reached.
I still wanna edit text in textbox even if the maximum length is reached.
I don’t need ‘Beep’ sound in my application, so it is okay to disable ‘Beep’ sound in whole application.
How can I disable it?
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP