473,320 Members | 1,922 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,320 software developers and data experts.

keypress for vbkeyspace

if keyascii = 32 then
text0 = text0 & " "
text0.selstart = len(text0)
end if

This does exactly what it needs to do when a breakpoint is added
inside the if. Without the breakpoint the keypress does not work
properly. Why would this be and how can it be rectified?

seeker53
Nov 12 '05 #1
1 3848
You haven't said whether this is on the keypress event of Text0, or some
other control.
My guess (in a vague, general way) is that this keypress is also causing
some other actions.
When you stop the code with your breakpoint, those other actions happen
first, then you execute your code and get the result you wanted.
If you don't stop the code, the other actions happen after yours, so you see
their effects, not yours.

One common approach to prevent other actions associated with the key you've
pressed is to use
keyascii=0
in your code, so the keystroke is not processed further.

HTH
- Turtle
"seeker52" <ak*****@hotmail.com> wrote in message
news:8c**************************@posting.google.c om...
if keyascii = 32 then
text0 = text0 & " "
text0.selstart = len(text0)
end if

This does exactly what it needs to do when a breakpoint is added
inside the if. Without the breakpoint the keypress does not work
properly. Why would this be and how can it be rectified?

seeker53

Nov 12 '05 #2

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

Similar topics

3
by: Darryn Ross | last post by:
Hi, I am trying to catch the KeyPress event on my datagrid but it isn't working... i have also tried registering the handler with the event like this... dgGLBatch.KeyPress += new...
2
by: rege | last post by:
Hi, I have two applications developed in C# say A and B. When user presses key "L" with applicaition A active , it causes a keypress event which causes application B to run. Application A then...
1
by: Rene | last post by:
Hi, I am running is some problems with the KeyPreview and KeyPress events. The KeyPress event is only triggered when there this an focusable control on the form. When all controls are disabled...
4
by: Tom | last post by:
I have a VB.NET user control that I wrote - this control has three or four other controls on it (textbox, combobox, datetime picker, etc). Now, whenever the control is on a form and the user enters...
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
3
by: Fia | last post by:
Hi In Visual Basic 6 I could call keypress with an integer of a choosen key. For example I could call a textbox's keypress with the number 13 (for the enter key). But now in Visual Basic .Net I...
5
by: Henry Jones | last post by:
I am new to C# and wanted to capture the KeyPress for a textbox. I created some code as follows: private void textBox3_KeyPress(object sender, System.EventArgs e) { this.textBox2.Text =...
2
by: Tony Johansson | last post by:
Hello! I have created a Control that consist of a label and a textbox.I have called this class ctlLabelTextbox. public partial class ctlLabelTextbox : UserControl { .... } The class that I...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.