473,513 Members | 11,702 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 1098

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

Similar topics

34
4873
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>...
1
4477
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...
3
3100
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...
0
1409
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...
2
2346
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: ...
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,...
4
7118
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...
11
5642
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...
0
995
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...
0
7254
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,...
1
7094
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7519
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
5677
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,...
1
5079
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...
0
4743
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...
0
3230
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3218
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1585
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 ...

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.