954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

DoEvents VB .NET Equivalent

I have written a small application and when the form open a new file, etc. the information is not posted to the screen until after the file processing has completed. I would like to display information as it is found. VB 6 used to use the DoEvents fundtion to force the system to display information but there does not seem to be an equivalent in VB .NET.

Also when the open file dialog is displayed and the file is selected the main form does not update until the process of openning the file has completed. This means you get pieces of the open file dialog screen distorting the main form until this open file proceesing has completed.

Does anyone have any suggestions foe each of these problems? :sad:

darrindarrinnet
Newbie Poster
3 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

I actually found the answer on-line:

Application.DoEvents()

Not surprisingly, it's pretty similar to the old way of doing it!!!
:o

darrindarrinnet
Newbie Poster
3 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

I'm using Visual Studio 7 VB.NET and it does not recognize application.doevents() method. The application object is derived from the system.windows.forms collection. VB.NET is using the System.Web.UI.WebControls collection to do most of its work when an aspx application is created.

The application object is recognized but the doevents method is not. So what is the answer? How can you refresh the display while executing code in the dll?

oxe74jb
Newbie Poster
1 post since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

I have written a small application and when the form open a new file, etc. the information is not posted to the screen until after the file processing has completed. I would like to display information as it is found. VB 6 used to use the DoEvents fundtion to force the system to display information but there does not seem to be an equivalent in VB .NET.

Also when the open file dialog is displayed and the file is selected the main form does not update until the process of openning the file has completed. This means you get pieces of the open file dialog screen distorting the main form until this open file proceesing has completed.

Does anyone have any suggestions foe each of these problems? :sad:

I'm looking for a raplacement for DoEvents myself, can't help you there. However when opening a file the best method is to load the contents of the file into a variable then populate your controls with the contents of the variable this will stop the distortion. Hope it helps.

FluidOne
Newbie Poster
1 post since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

System.Windows.Forms.Application.DoEvents()

shilts
Newbie Poster
1 post since Nov 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You