1,105,406 Community Members

DoEvents VB .NET Equivalent

Member Avatar
darrindarrinnet
Newbie Poster
3 posts since Dec 2004
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
-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:

Member Avatar
darrindarrinnet
Newbie Poster
3 posts since Dec 2004
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

I actually found the answer on-line:

Application.DoEvents()

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

Member Avatar
oxe74jb
Newbie Poster
1 post since Jan 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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?

Member Avatar
FluidOne
Newbie Poster
1 post since Sep 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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.

Member Avatar
shilts
Newbie Poster
1 post since Nov 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

System.Windows.Forms.Application.DoEvents()

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