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

doevent

what is the alternate command of DoEvent in vb.net

lal
Nov 21 '05 #1
7 12425
Application.DoEvents

But only if you really need to. DoEvents is a VB thing, and only included in
VB.NET for compatability.

Best Regards,
Phil Harvey
--------------------
http://spaces.msn.com/members/dotnetspace
Nov 21 '05 #2
Application.DoEvents
"Lal - Luxor" <kr****@luxoroffice.com> escribió en el mensaje
news:el**************@TK2MSFTNGP12.phx.gbl...
what is the alternate command of DoEvent in vb.net

lal

Nov 21 '05 #3
"Lal - Luxor" <kr****@luxoroffice.com> schrieb:
what is the alternate command of DoEvent in vb.net


'Application.DoEvents'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 21 '05 #4
Phil,

If that were true then DoEvents would be part of the visual basic
compatibility namespace and the help files would not give an example of using
doevents in C#.

Kerry Moorman

"Phil Harvey" wrote:

But only if you really need to. DoEvents is a VB thing, and only included in
VB.NET for compatability.

Best Regards,
Phil Harvey
--------------------
http://spaces.msn.com/members/dotnetspace

Nov 21 '05 #5
Phil,
But only if you really need to. Correct.
DoEvents is a VB thing, and only included in
VB.NET for compatability. Totally false, DoEvents is a Windows Forms thing! Hence it being part of the
System.Windows.Forms.Application class.

It allows your program to invoke the Windows Forms Message Pump. the Message
Pump is a Win32 feature that allows your app to remain responsive to windows
messages. It converts Win32 messages into Windows Forms events.

Useful when you have an event handler that is taking too much time.
But only if you really need to. You need to be careful as DoEvents will allow your event handlers to be
reentered, for example if you call it while handling the Button1.Click
event, you could cause a second Button1.Click event to be handled at the
same time (assuming the user pressed button1 twice), this may cause
unexpected or undesired behavior in your app.

Hope this helps
Jay
"Phil Harvey" <ph***@teamlink.it> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Application.DoEvents

But only if you really need to. DoEvents is a VB thing, and only included
in
VB.NET for compatability.

Best Regards,
Phil Harvey
--------------------
http://spaces.msn.com/members/dotnetspace

Nov 21 '05 #6
Thanks for that Jay, your right about the compatability and I was mistaken.
I've got this thing about it stuck in my head because I try and use threads
for anything that might hang the UI, and hence need a DoEvents call.
I just don't trust the things. Its probably just my paranoia.

Phil

--------------------
http://spaces.msn.com/members/dotnetspace
Nov 21 '05 #7
Phil,
Trying to use Threads is normally a good thing. However there are times when
not using them & using a Timer may be better...

It appears that VS.NET 2005 (aka Whidbey, due out later in 2005) will have a
new BackgroundWorker class that will make working with threads for easier.

For details on the System.ComponentModel.BackgroundWorker class see:
http://msdn2.microsoft.com/library/4852et58.aspx

For details on VS.NET 2005 see:
http://lab.msdn.microsoft.com/vs2005/

Hope this helps
Jay

"Phil Harvey" <ph***@teamlink.it> wrote in message
news:eX**************@TK2MSFTNGP10.phx.gbl...
Thanks for that Jay, your right about the compatability and I was
mistaken.
I've got this thing about it stuck in my head because I try and use
threads
for anything that might hang the UI, and hence need a DoEvents call.
I just don't trust the things. Its probably just my paranoia.

Phil

--------------------
http://spaces.msn.com/members/dotnetspace

Nov 21 '05 #8

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

Similar topics

3
by: James Dixon | last post by:
I have created a windows service in C#, .net framework 1.1 The service makes a web request using the mshtml.HTMLDocument.CreateDocumentFromURL() function Because this is not using...
31
by: Greg Scharlemann | last post by:
Given some recent success on a simple form validation (mainly due to the kind folks in this forum), I've tried to tackle something a bit more difficult. I'm pulling data down from a database and...
6
by: Jerry Haynes | last post by:
I've looked in the July 2003 version of the MSDN Library and I'm not getting much support on the Application.DoEvent method. I've written a small app to get an idea of how it works and am having...
0
by: bird lazy | last post by:
Hi all, In Windows Forms app I can use Application.DoEvens -- bat i have to wait until backgroundworker.IsBusy. What can you suggest? --
5
by: a | last post by:
Hi In VB6, if we need a loop to wait something from the OS, like a signal from internet, we need to pass the token to the token inside the loop. For example, while(1) doevent if (flag ==1) then...
2
by: jyanmin.fang | last post by:
Hi, In my current project, I need to embed an .NET winform usercontrol in the aspx page (via <Objecttag). This winform usercontrol has an event called DoEvent (void DoEvent()). This winform...
1
by: luca72 | last post by:
Hello at all I try to use qt , but i have problem, i don't find the command like wx.Yield() in wx or doevent in vb. Can you tell me the same command in qt Regards Luca
0
by: evergreen501 | last post by:
I am done an application in which i parse set of word document content and fill in a datagridview.since the process is single thread and heavy process, at the same time i want to execute windows...
2
by: Erick Otieni | last post by:
Hi all, Does anyone have an idea to solve this problem in asp? I have tried to look everywhere for the last week but no one seems to have the answer. The issue is that I have the script below...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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
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
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...

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.