473,406 Members | 2,467 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,406 software developers and data experts.

SendKeys - Beep - Suppress

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
6 3294
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mr. Bungle | last post by:
I would like to send email automatically via a command button. I have accomplished this just fine through the following code: (Outlook should already be open for reliable results) Private Sub...
2
by: RBohannon | last post by:
I need to create a report in MS Word populated with data from A2K. I have been asked to create the report in Word so that parts of it can be edited as necessary later. The data in the report are...
1
by: George | last post by:
Every time I used the Sendkeys command in my application the "Numlock" turned off and I couldn't use the keypad to hit numbers...... The old code was: Private Sub Command1_Click() SendKeys...
5
by: Wayne Gibson | last post by:
Hi, Was wondering if somebody could help.. I'm trying to use Sendkeys on a Windows forms. I have entered the following command to simulate a CTRL+ALT+1.. ...
1
by: Bryan | last post by:
I am writing a C# Windows App that updates out Excel reports' modules. The app is complete, but has a problem. The only way MS allows you to unprotect the VBA code in Excel is to do it by hand or...
2
by: MLH | last post by:
I have the following code with a SendKeys statement in it. 100 If Me.Dirty Then MsgBox "Form is Dirty!" 120 Dim MyQ As String, MyTitle As String, Response As Boolean 140 MyQ =...
4
by: =?Utf-8?B?UmljaA==?= | last post by:
When I press the Enter key in a Textbox I get a beep sound. But when I press the Enter key in a combobox, I don't get the beep sound. Is there a way to suppress the beep? How to do this? ...
0
by: dtshedd | last post by:
I have a database with hundreds of embedded photos (Microsoft Photo 3.0) Many are larger than 1 MB. I tried Stephen Lebans macro but it did not work probably for the aforementioned reasons Now...
2
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= | last post by:
I have a tabcontrol where I want to capture the CTRL+C key combination. My tabcontrol has on its tabpages some treeView controls. My intention is to intercept the event of pressing the CTRL+C when...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.