1.11M Members

DoEvents VB .NET Equivalent

 
-1
 

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:

 
0
 

I actually found the answer on-line:

Application.DoEvents()

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

 
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?

 
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.

 
0
 

System.Windows.Forms.Application.DoEvents()

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article