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

how to suppress an event?

Is there any way to suppress an event method?

i got Enter & leave Events on two groupBoxs, they r " private void groupBox1_Enter(object sender, System.EventArgs e)" and private void groupBox1_Leave(object sender, System.EventArgs e) event methods, from msdn info the order of execution for them will be
1> Enter
2>GotFocus
3>lost focus
4>Leave
5>Validating

i used only Enter and Leave events, after entering a groupBox i can see that "Enter" event has been fired but when i fire a gui event with my mouse click, Leave event is not getting activated. so i manually activating that event method, but in some situations its getting activated too many time.
if the above info is too confusing just answer this Question "can i cancel an event before its getting activated?".

Nov 15 '05 #1
1 9281
Hi seash,

I think you run into one of the well known bugs in the framework. The
sequence of events you provided is what it has to be. Due to a bug in the
framework it happens only if the focus is switched using the *Tab* key.

To answer your question I would say there is no way to stop a control to
raise an event. If it is control written by yourself or control that you
inherit from any of the windows forms controls you can override event's
corresponding OnXXXX method and if you don't want the event to be fired
don't call the base implementation (base.OnXXXX). I don't think it solves
your problem, though.

--
B\rgds
100

"seash" <an*******@discussions.microsoft.com> wrote in message
news:47**********************************@microsof t.com...
Is there any way to suppress an event method?

i got Enter & leave Events on two groupBoxs, they r " private void groupBox1_Enter(object sender, System.EventArgs e)" and private void
groupBox1_Leave(object sender, System.EventArgs e) event methods, from
msdn info the order of execution for them will be 1> Enter
2>GotFocus
3>lost focus
4>Leave
5>Validating

i used only Enter and Leave events, after entering a groupBox i can see that "Enter" event has been fired but when i fire a gui event with my mouse
click, Leave event is not getting activated. so i manually activating that
event method, but in some situations its getting activated too many time. if the above info is too confusing just answer this Question "can i cancel an event before its getting activated?".

Nov 15 '05 #2

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

Similar topics

2
by: theintrepidfox | last post by:
Dear Group Just wondered whether you have any advice on the following? I have a form with a TabControl and when the form loads, the SelectedIndexChanged event is fired. Is there any chance to...
1
by: Top Gun | last post by:
I am trying to trap on a keypress "+" event and convert it to a tab for a high-speed dataentry form that is done entirely from a 10-key. However, I do NOT want the "+" character to be passed on to...
7
by: Marco Roberto | last post by:
Hi, does anybody know how to suppress an event? I have a combo box with the following code? Private Sub cmb_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmb.GotFocus...
3
by: John | last post by:
Hi I have a win app running under windows scheduler. Sometimes the just-in-time debugger comes up requiring the user to select a debugger. Is it possible to suppress this as it becomes...
2
by: solar | last post by:
Is there any possibility to suppress a message box from Access ? I have a complicated but a good code that calculates the possibilities in the before update event, and if a condition is met, then...
5
by: Antonio | last post by:
Hello, everyone. Is there a way to not display a certain value in a datagrid cell? I have a datagrid for subscriptions and ebooks and if there isn't an e-book listed, the value from the...
5
by: Luke Skywalker | last post by:
Hi to all, I need to suppress the function keys (F1, F2, F3 ecc.) to use these keys to do other operations within the web pages of my application. I wrote this code: ...
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? ...
2
by: ZeeHseez | last post by:
Hi, I have written a webbrowser application in VB .net Framework 1.1. I would like to suppress javascript error messages. However, the silent property of the webbrowser control suppresses the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
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...
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
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,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.