473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

TextBox Sound Problem.

I assigned Enter key to do sth after I write sth to a TextBox but I
gives me a system sound like "this is not multiline textbox enter
does not work here " and Beeps.

I dont want this sound to be played. How can I avoid this? Thanks...
Posted at: http://www.groupsrv.com

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 17 '05 #1
4 5940
Override IsInputKey method like following :
class TextBox2:TextBox {
protected override bool IsInputKey(Keys keyData) {
if (keyData==Keys.Enter) return true;
return base.IsInputKey (keyData);
}
}

And use in your form TextBox2 instead of TextBox. There will be no more
beep.

Hope it helps,

Ludovic Soeur.

"ShoCkwave" <or*********@msn-dot-com.no-spam.invalid> a crit dans le
message de news:42**********@127.0.0.1...
I assigned Enter key to do sth after I write sth to a TextBox but I
gives me a system sound like "this is not multiline textbox enter
does not work here " and Beeps.

I dont want this sound to be played. How can I avoid this? Thanks...
Posted at: http://www.groupsrv.com

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 17 '05 #2
Override IsInputKey method like following :
class TextBox2:TextBox {
protected override bool IsInputKey(Keys keyData) {
if (keyData==Keys.Enter) return true;
return base.IsInputKey (keyData);
}
}

And use in your form TextBox2 instead of TextBox. There will be no more
beep.

Hope it helps,

Ludovic Soeur.

"ShoCkwave" <or*********@msn-dot-com.no-spam.invalid> a crit dans le
message de news:42**********@127.0.0.1...
I assigned Enter key to do sth after I write sth to a TextBox but I
gives me a system sound like "this is not multiline textbox enter
does not work here " and Beeps.

I dont want this sound to be played. How can I avoid this? Thanks...
Posted at: http://www.groupsrv.com

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Nov 17 '05 #3
Well,

I discovered how to overcome to this. Enabled Multiline but after
Pressing enter I set text to Null and yes! No sound and it works.
Posted at: http://www.groupsrv.com

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 17 '05 #4
Well,

I discovered how to overcome to this. Enabled Multiline but after
Pressing enter I set text to Null and yes! No sound and it works.
Posted at: http://www.groupsrv.com

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: got4a | last post by:
Hi guys, Lots of threads and ideas, but I couldn't find what I'm looking for. Hence, this. I have asp page (say, 1.asp) that has a textbox. This page is available to me in read-only mode,...
0
by: ShoCkwave | last post by:
I assigned Enter key to do sth after I write sth to a TextBox but I gives me a system sound like "this is not multiline textbox enter does not work here " and Beeps. I dont want this sound to be...
0
by: Steph. | last post by:
Hi, I have made a new custom TextBox control to enable ENTER and TAB keys to be trapped in the "KeyPress" and "KeyDown" Events. to do that I have overridden the "IsInputKey" property in my...
3
by: Tariq | last post by:
This might sound like a stupid question, but anywas when you assign an int to a textbox via the textbox.text propperty I assume boxing happens. If this assigment happend too often rapidly on a...
0
by: phil | last post by:
I'm having the same problem. Basically, what I need to know is - Can I move more than 4000 characters from a TextBox in a Web Form to a string? If so, some code that illustrates how to do this...
0
by: Dot net work | last post by:
Hi, Make up a very simple project as follows: 1 aspx form 3 web user controls (referred to as A, B, and C) "A" web user control: Put 1 textbox and 1 button on this web user control. (You...
6
by: =?Utf-8?B?VmVybm9uIFBlcHBlcnM=?= | last post by:
I have an application that is designed for using with a bar code scanner. I want the user to know that the scan was complete and the data was entered, so I am playing a system sound after data...
9
by: =?Utf-8?B?dHBhcmtzNjk=?= | last post by:
OK I have some Chinese text in sql server column that looks like this: 12大专题调研破解广东科学发展难题 This is unicode? Anyway, I put this data into a text area like this:...
7
vdraceil
by: vdraceil | last post by:
I'm currently working on a project in vb6. I have a textbox in which the user is supposed to enter his/her name and press enter. When i give my name and press enter a short beep is heard, but the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.