[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

FAST LIST BOX DURING READING DATA RECORDS

Posted on 2006-06-15
6
Medium Priority
?
284 Views
Last Modified: 2010-04-17
In dos I was used to do:

View print 5 to 24
 color 0,7
 cls
 then while reading records to show user whats happening,
  print a$;chr$(179);b$;chr$(179);c$;chr$(179);d$
 read next, print next.

This way he will see the data comming over his screen

What would be the same doing in VB6  ?


0
Comment
Question by:BIAPRO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 16911618
You could update a Label with the current record data being read.

Or add each record to the end of your listbox and move the selection to the end so it scrolls as records are added.  This slows down the process a bit though.

To see these updates you have to add a DoEvents to your loop though.
0
 
LVL 15

Expert Comment

by:bpmurray
ID: 16911630
Do you want this to continue running in a DOS box, or as a Windows GUI app? I presume the latter, so you need to create a form that will be your GUI. You'll probably add a button that says "Cancel" to allow the user to abort the program in the middle, and change the text to "OK" when it's finished. You can display what's happening by creating a text box that scrolls with whatever you display in it, similar to what you have to day. Alternatively you can have a single field that displays the current record, replacing it with the next one as it's being processed. The string you display is almost the same, although chr$(179) is not what you should use:

         TextBox1.Text = a$ + "-" + b$+ "-" + c$+ "-" + d$;
0
 

Author Comment

by:BIAPRO
ID: 16911741
The listbox will add records, but is not showing the records while they are added,
lstbox1.AddItem (a$)
and when its eof  then the list stands at top off box,
the idea was during long reads keep the user informed whats happening
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 15

Expert Comment

by:bpmurray
ID: 16911896
No a listbox isn't great for this kind of thing (as you've already noticed). I think the best solution is to either use a text box where you manage scrolling yourself, or a simple set of fields that you set to the current record's values. You could also use a progressbar that indicates how much of the data has been processed.
0
 

Author Comment

by:BIAPRO
ID: 16911954
Ok, will play a bit, maybe a gridbox, and reshow grid after every 10 records or so
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 2000 total points
ID: 16912014
If you really want the newly added item to be seen then either change the TopIndex or the ListIndex property each time you add something new:

        lstbox1.AddItem "something..."
        lstbox1.TopIndex = lstbox1.ListCount - 1
        ' or
        lstbox1.ListIndex = lstbox1.ListCount - 1
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question