473,587 Members | 2,473 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

KeyUp in MsgBox

Hi,

I need help in the following:

I have a base class, called frmBase, in wich I have a routine that gives to
all form objects a handle to track the KeyUp Event of all inherited class
object, to centralize them.

When in the derivated class, called frmXPTO, the users press the Enter key
ou Esc Key this routine will be called (so far so good) catches wich key was
pressed and, if it was the Enter key it will validate each textbox text (as
it must be).

If the text of a textbox doesn't fill the needs it wil show a MsgBox
indicating what's wrong (that's good).

What's wrong is that in the MsgBox if the user presses the Enter key to
close it, it will fire up the KeyUp handler routine, doing all again, i.e.,
frmXPTO is derivated from frmBase, catches up the Enter key firing up the
KeyUp handler routine.

All this is in Windows Forms Application.

Thanks,

Amaro
Jul 21 '05 #1
0 1112

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

Similar topics

34
4893
by: Andrew DeFaria | last post by:
I thought this would be fairly straight forward but apparently it's not. Given the following html file: <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <title>Test</title> </head> <body> <form method="post" action="javascript:">
1
4486
by: Ori | last post by:
Hi Guys, Here is my problem, but maybe someone can help me with this. Background: 1. Using C#. 2. I'm having a form which the KeyPreview is on (and must stay like this) and I'm implementing some functions on the Key up event of some controls and the form.
3
3114
by: Sharon | last post by:
I’m using a DataGrid control on my form; and I want to handle the KeyUp event. So I did: myDataGrid.KeyUp += new KeyEventHandler(this.OnKeyUp); When the DataGrid is empty, I mean when It has no data so now rows are seen, all keys are causing my this.OnKeyUp(...) to be invoked correctly. But when the DataGrid is populated with some data...
0
1412
by: Gene Hubert | last post by:
I'm trying to catch the KeyUp event in textbox of a DataGrid. I'm picking up the keydown and keypress events ok, but not keyup. Can anyone see what is wrong with this code. I been fighting with this for way too long. Thanks a ton, Gene H. ==================
2
2347
by: Adam J. Schaff | last post by:
I have recently noticed an unwanted behavior that I do not know how to get rid of. To Recreate Problem: Windows Forms App with 2 forms. Form 1 has nothing on it and this code underneath: Private Sub Form1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp If e.KeyCode = Keys.Return Then
0
271
by: Amaro Cantador | last post by:
Hi, I need help in the following: I have a base class, called frmBase, in wich I have a routine that gives to all form objects a handle to track the KeyUp Event of all inherited class object, to centralize them. When in the derivated class, called frmXPTO, the users press the Enter key ou Esc Key this routine will be called (so far so...
4
7124
by: ShaneO | last post by:
I would like to handle the KeyUp & KeyDown events in the same event handler but can't find how to determine which event was fired - Private Sub ListBox1_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) _ Handles ListBox1.KeyUp, ListBox1.KeyDown If e.KeyValue = Keys.PageDown Or e.KeyValue = Keys.PageUp Or...
11
5649
by: Ben | last post by:
Hello, I'm trying to catch the pressing of the left and right arrow keys through the KeyUp event, like so: public Form1() { InitializeComponent(); Form1.ActiveForm.KeyUp += new KeyEventHandler(ActiveForm_KeyUp);
0
999
by: =?Utf-8?B?RGF2aWQgTmljaG9scw==?= | last post by:
I'm writing a data entry application where many fields are validated and committed through KeyUp capturing a Return keycode. My problem is that if a message box pops up and the user presses the Enter key to respond, that keystroke is captured by the form KeyUp event. An example is the user changing a field value and a message box displays...
0
7918
marktang
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8220
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6621
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5713
isladogs
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1452
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.