Using VS .NET 2003 on an up-to-date XP Pro machine:
I'm getting bizarre results in a VB Windows app trying to implement the
OnKeyUp event handler. I have a form with a label control and code simialr
to the following:
Protected Overrides Sub OnKeyUp(ByVal e As
System.Windows.Forms.KeyEventArgs)
Select Case e.KeyCode
Case Keys.Up
lblKeyVal.Text = "Up Arrow"
Case Keys.Enter
lblKeyVal.Text = "Enter"
Case Keys.Escape
lblKeyVal.Text = "Escape"
End Select
End Sub
When I run this code on a sample project with no other code in it it seems
to run fine. However, when I place this identical code into my development
project, strange things happen. When I press either the *Enter* or the
*Escape* key, it works as expected. However, as soon as I press the *Up
Arrow* key, the program ceases to respond to key presses. If I place a
breakpoint at the first line of the Sub, it breaks there for every *Enter*
and *Escape* keypress until the first time I press the *Up Arrow*. Pressing
the *Up Arrow* does not result in execution halting at the breakpoint, and
afterwards the *Enter* and *Escape* keys also fail to activate the
breakpoint.
Any ideas???
TIA
William Barnes 2 1799
William Barnes wrote: Using VS .NET 2003 on an up-to-date XP Pro machine:
I'm getting bizarre results in a VB Windows app trying to implement the OnKeyUp event handler. I have a form with a label control and code simialr to the following:
Protected Overrides Sub OnKeyUp(ByVal e As System.Windows.Forms.KeyEventArgs)
Select Case e.KeyCode Case Keys.Up lblKeyVal.Text = "Up Arrow" Case Keys.Enter lblKeyVal.Text = "Enter" Case Keys.Escape lblKeyVal.Text = "Escape" End Select
End Sub
When I run this code on a sample project with no other code in it it seems to run fine. However, when I place this identical code into my development project, strange things happen. When I press either the *Enter* or the *Escape* key, it works as expected. However, as soon as I press the *Up Arrow* key, the program ceases to respond to key presses. If I place a breakpoint at the first line of the Sub, it breaks there for every *Enter* and *Escape* keypress until the first time I press the *Up Arrow*. Pressing the *Up Arrow* does not result in execution halting at the breakpoint, and afterwards the *Enter* and *Escape* keys also fail to activate the breakpoint.
Any ideas???
TIA
William Barnes
Are you handling anything in the OnKeyDown or ProcessCmdKey events?
Chris
No, the only overrides are this one and OnPaint()
William
"Chris" <no@spam.com> wrote in message
news:%2*****************@TK2MSFTNGP09.phx.gbl... William Barnes wrote: Using VS .NET 2003 on an up-to-date XP Pro machine:
I'm getting bizarre results in a VB Windows app trying to implement the OnKeyUp event handler. I have a form with a label control and code simialr to the following:
Protected Overrides Sub OnKeyUp(ByVal e As System.Windows.Forms.KeyEventArgs)
Select Case e.KeyCode Case Keys.Up lblKeyVal.Text = "Up Arrow" Case Keys.Enter lblKeyVal.Text = "Enter" Case Keys.Escape lblKeyVal.Text = "Escape" End Select
End Sub
When I run this code on a sample project with no other code in it it seems to run fine. However, when I place this identical code into my development project, strange things happen. When I press either the *Enter* or the *Escape* key, it works as expected. However, as soon as I press the *Up Arrow* key, the program ceases to respond to key presses. If I place a breakpoint at the first line of the Sub, it breaks there for every *Enter* and *Escape* keypress until the first time I press the *Up Arrow*. Pressing the *Up Arrow* does not result in execution halting at the breakpoint, and afterwards the *Enter* and *Escape* keys also fail to activate the breakpoint.
Any ideas???
TIA
William Barnes
Are you handling anything in the OnKeyDown or ProcessCmdKey events?
Chris This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Trent |
last post by:
Hi. I know the basic way to assign event handlers:
<input onKeyUp="processEvent(event)" />
But how do I assign a function to the onKeyUp event in *javascript*
that can access the event...
|
by: Evan Wong |
last post by:
I have problem to get onkeyup event. If we put the event in HTML
statement like -
"<input name=field1 size=16 onkeyup="javascript:function1();>"
it works.
If we put in JavaScript code like...
|
by: greg |
last post by:
hello
i would like to apply an onkeyup event to every element of my form
in order to do that, i would use the array form.elements, doing something
like that :
...
|
by: john.lum |
last post by:
My overall objective is to create something akin to Google Suggest,
where a query is done in response to changes in a text field presented
to the user.
I've got things working using the onkeyup...
|
by: Brad |
last post by:
The first text on my form is a numeric field. I have a javascript that
runs on this field for onkeyup (validate the key strokes and modifies
fields on the screen) but when I do this and have the...
|
by: Lee |
last post by:
I have this function that doesn't work. I pass it the td element and
an id, and it makes an input field inside the td. That part workds.
What doesn't work is that I want to add an "onkeyup" on...
|
by: mai |
last post by:
Hi everyone,
i'm trying to exhibit FIFO anomaly(page replacement algorithm),, I
searched over 2000 random strings but i couldnt find any anomaly,, am
i I doing it right?,, Please help,,,The...
|
by: mc |
last post by:
Can someone suggest how I would add a new trigger such that when the JS event onkeyup in a textbox
the updatePanel refreshes?
If not could someone sugest how I could onkepup in a Textbox, refresh...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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
|
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...
|
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...
|
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...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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,...
|
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: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |