Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have an application that loads database information into an array and does some amount of processing. This takes time and to let users know something is happening (to show the program hasn�t locked up) I would like to be able to create a simple 0-100% bar graph, that fills from left to right, informing people of the progress of the data load. Here is a simplified version of the data load:

 

FileOpen(1, inputfilelocation, OpenMode.Input)

 

Index = 0

While Not EOF(1)

 

Dataline(index) = LineInput(1)

Index = index + 1

 

� This routine does the data processing

Call processdata()

 

End While

 

FileClose(1)

 

 

Knowing that I have to read in approx. 40,000 lines of text data (which probably simplifies things), how do I create a bar graph, indicating the progress of the load?

 

Thanks in advance,

 

Visualbasicuser

  • Administrators
Posted

VB.Net ships with a progress bar control. Simply add that to the form.

Set its maximum property to the number of lines and add 1 to it's Value property every time you read a line in.

 

More importantly though - you really should be using the .Net file access methods. Look at System.IO or search these boards for many examples.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...