473,399 Members | 3,888 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,399 software developers and data experts.

Does Application.DoEvents() re-handles an event ???


In my code I have the following scenario:

Private Sub f1(ByVal sender As Object, _
ByVal e As System.Windows.Forms.MouseEventArgs) _
Handles myListView.MouseUp ' declared in obj1
...
RaiseEvent mcEvClick(anItem)
...
End Sub
...
Private Sub f2(ByVal aDataItem As classItem) Handles myObj1.mcEvClick
' declared in obj2
...
obj3.f3()
...
End Sub
...
Private Sub f3() ' declared in obj3
...
While (Me.ReadyState <> "complete")
Application.DoEvents()
End While
End Sub

When I click the mouse on obj1.myListView I get obj1_f1() called
sequentially.
This sequence ends only when I move the mouse out of obj1.myListView.
I guess this happen because in obj3_f3 I call
Application.DoEvents()
which reHandle the first MouseUp event that started the whole
scenario.
and when I move the mouse, the events message queue is changed.

1. Is it true that Application.DoEvents() reHandle the last event
if I didnot leave the handler obj1_f1() ?
2. If so, how can I mark this event as handled, so I will not reHandle
it ?
Thanks
Atara.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #1
0 763

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

Similar topics

5
by: me | last post by:
I have a Class Library that contains a Form and several helper classes. A thread gets created that performs processing of data behind the scenes and the Form never gets displayed (it is for debug...
0
by: me | last post by:
I have a Class Library that contains a Form and several helper classes. A thread gets created that performs processing of data behind the scenes and the Form never gets displayed (it is for debug...
6
by: Ollie Riches | last post by:
I understand the use of Application.DoEvents() to process all outstanding messages on the message queue in a winforms application if you have long running process on the UI thread. But can anyone...
5
by: Scupper | last post by:
Certain "Imports" of classes change the frame of reference within a class such that making calls to functions such as "Application.DoEvents()" and so on becomes ambiguous and gives a "Reference to...
0
by: Howard Kaikow | last post by:
If one has code that cannot include DoEvents, is it possible to achieve the equivalent of either of the following Excel VBA codes in VB .NET? Public Sub EnableInterrupt1() Const...
0
by: Mika M | last post by:
Hi! I'm using Rs232-class, which was shipped with 101 VB.NET samples by Microsoft. Application is made to read COM-port with the following code... Try Me.tmrReadCommPort.Enabled = True If...
1
by: Viet | last post by:
I don't know if this is the right forum for my question but here goes: I am converting a VB6 app to VB.NET and I would like to use Threads and Threadpools. This main app (1) executes two other sub...
1
by: RSH | last post by:
I created a new Windows Form project and I created a simple richtextbox to write to and I am looping through a simple example but obviously the screen isn't updated it only shows the first...
13
by: Amjad | last post by:
Hi, Is there an equivalent to the "Application.Doevents" method in modules or Windows services? I want to make a Windows service that calls a DLL. The DLL would have all my functions and it...
11
by: Don | last post by:
I have a WPF application in VB in VSTS 2008 RTM. I am trying to "blink" (momentarily clear) a field of data if the data is reloaded from the database to give the user some visual indication of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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
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
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...
0
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,...

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.