c# - Disable Enter Key in Textboxes -
i developing chatting system. , have button send text in text box chat log. how going stop user press enter key , disable enter key. know there many posts out there this, solutions haven't worked me.
i think not need stop user pressing enter instead send chat other person on press of enter.
also if have other shortcuts allowed can have @ c#: how make pressing enter in text box trigger button, yet still allow shortcuts such "ctrl+a" through?
using same can block
private void textboxtosubmit_keydown(object sender, keyeventargs e) { if (e.keycode == keys.enter) { e.suppresskeypress=true; } }
Comments
Post a Comment