By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,625 Members | 1,283 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,625 IT Pros & Developers. It's quick & easy.

SendKeys - Beep - Suppress

P: n/a
Hello,

I'm invoking successive
SendKeys.SendWait("{BACKSPACE}")
SendKeys.SendWait("{DELETE}")
in a loop.

The issue is that it causes a Beep on every Pass.

Setting the 'Handled = True' on the Control does prevent the Beep, but
messes-up the Backspace-Delete Sequence.

Is there another way to prevent the Beep to occur?

TIA,

Michael
Dec 15 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Michael Maes wrote:
Hello,

I'm invoking successive
SendKeys.SendWait("{BACKSPACE}")
SendKeys.SendWait("{DELETE}")
in a loop.

The issue is that it causes a Beep on every Pass.

Setting the 'Handled = True' on the Control does prevent the Beep, but
messes-up the Backspace-Delete Sequence.

Is there another way to prevent the Beep to occur?

TIA,

Michael


Well if possible don't use sendkeys. Are you doing sendkeys to your own
program? Can you explain a little why your doing, there may be a better
solution.

Chris
Dec 15 '05 #2

P: n/a
Well Chris it is indeed in our own program.
We have to use SendKeys on a TX TextControl v11.0.
The problem is TextControl can not programmatically remove a Paragraph.
The only way to acchieve this is by using SendKeys (though not recommended :-)

TextControl can thus 'Clear' the content of a line, but it can not remove
that line as a whole. It is like you're in Word and you have three lines:

Line One with text
Line Two with text
Line Three with text

You then want to remove line 2.
This can be done in code, but it results in:

Line One with text

Line Three with text

So what we then HAVE to do is select Line2, Col1 and perform:
SendKeys.SendWait("{BACKSPACE}")
SendKeys.SendWait("{DELETE}")

This results in:

Line One with text
Line Three with text

as desired.

TX TextControl will fix this in the next SP but that will be in 6 to 12
months?

Wel release our final candidate in a couple of days!
So we're really in trouble here.

SendKeys.SendWait "does" the job (as a workarround), even if it has to
delete 50 lines in a loop, BUT it triggers the Beep and that's real bad :-(

I was thinking about setting Mute On/Off (with checks and so on) but that's:

A: A bit drastic
B: Probably makes "the" mute-notification appear
Regards,

Michael
"Chris" wrote:
Michael Maes wrote:
Hello,

I'm invoking successive
SendKeys.SendWait("{BACKSPACE}")
SendKeys.SendWait("{DELETE}")
in a loop.

The issue is that it causes a Beep on every Pass.

Setting the 'Handled = True' on the Control does prevent the Beep, but
messes-up the Backspace-Delete Sequence.

Is there another way to prevent the Beep to occur?

TIA,

Michael


Well if possible don't use sendkeys. Are you doing sendkeys to your own
program? Can you explain a little why your doing, there may be a better
solution.

Chris

Dec 15 '05 #3

P: n/a
Michael Maes wrote:
Well Chris it is indeed in our own program.
We have to use SendKeys on a TX TextControl v11.0.
The problem is TextControl can not programmatically remove a Paragraph.
The only way to acchieve this is by using SendKeys (though not recommended :-)

TextControl can thus 'Clear' the content of a line, but it can not remove
that line as a whole. It is like you're in Word and you have three lines:

Line One with text
Line Two with text
Line Three with text

You then want to remove line 2.
This can be done in code, but it results in:

Line One with text

Line Three with text

So what we then HAVE to do is select Line2, Col1 and perform:
SendKeys.SendWait("{BACKSPACE}")
SendKeys.SendWait("{DELETE}")

This results in:

Line One with text
Line Three with text

as desired.

TX TextControl will fix this in the next SP but that will be in 6 to 12
months?

Wel release our final candidate in a couple of days!
So we're really in trouble here.

SendKeys.SendWait "does" the job (as a workarround), even if it has to
delete 50 lines in a loop, BUT it triggers the Beep and that's real bad :-(

I was thinking about setting Mute On/Off (with checks and so on) but that's:

A: A bit drastic
B: Probably makes "the" mute-notification appear
Regards,

Michael
"Chris" wrote:

Michael Maes wrote:
Hello,

I'm invoking successive
SendKeys.SendWait("{BACKSPACE}")
SendKeys.SendWait("{DELETE}")
in a loop.

The issue is that it causes a Beep on every Pass.

Setting the 'Handled = True' on the Control does prevent the Beep, but
messes-up the Backspace-Delete Sequence.

Is there another way to prevent the Beep to occur?

TIA,

Michael


Well if possible don't use sendkeys. Are you doing sendkeys to your own
program? Can you explain a little why your doing, there may be a better
solution.

Chris

I don't have any knowledge on stopping the beep, sorry. Can you set the
entire "TextControl" to something? If that the case you could make your
changes outside the the control and reset the Text property. Just an
idea, sorry.

Chris
Dec 15 '05 #4

P: n/a
Hi michael,

Thanks for your post.

I suspect that it is your 3rd party "TX TextControl v11.0." control caused
this beep. Because in my test project, the
SendKeys.SendWait("{BACKSPACE}")
SendKeys.SendWait("{DELETE}")
does not cause any beep for the standard textbox.

So I suggest you check if this problem occurs with the standard TextBox. If
not, I think you may have to contact the vendor company of "TX TextControl
v11.0." control for this issue.

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Dec 16 '05 #5

P: n/a
Hi guys,

Thanks both of you for your time on this issue.
We have indeed a case open at TX TextControl.
I do hope they come with a solution.

The problem is that it can't be - exactly - reproduced with a MS-Control
because before every 'SendKeys-Sequence' we Call a method on TX to remove a
'TextField'.
But it is the SendKeys that causes the Beeps.

Also making the changes in a StringBuilder is also not an option because (to
my knowledge) there's no way to retain the Document layout (meta-data) if you
use the Text-Property.

I guess in the mean time we have to use mute (how ugly a workarround it is)
to prevent the beeps from being audible :-(

Thanks!

Michael

""Jeffrey Tan[MSFT]"" wrote:
Hi michael,

Thanks for your post.

I suspect that it is your 3rd party "TX TextControl v11.0." control caused
this beep. Because in my test project, the
SendKeys.SendWait("{BACKSPACE}")
SendKeys.SendWait("{DELETE}")
does not cause any beep for the standard textbox.

So I suggest you check if this problem occurs with the standard TextBox. If
not, I think you may have to contact the vendor company of "TX TextControl
v11.0." control for this issue.

Thanks

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Dec 16 '05 #6

P: n/a
Hi michael,

Thanks for your feedback.

Yes, I see your concern. However, because the problem lies in TX
TextControl, there is not much thing we can do to help you.

I have ever worked on an issue regarding getting rid of beep in standard
control, hope it may help you:
http://groups.google.com/group/micro...rk.windowsform
s/browse_frm/thread/d169293e420a2907/ced238f00e0c93c1?lnk=st&q=beep+%22Jeffr
ey+tan%22&rnum=1&hl=zh-CN#ced238f00e0c93c1

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Dec 16 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.