Results 1 to 11 of 11

Thread: Progress bar Question

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2002
    Location
    Central US
    Posts
    183

    Question Progress bar Question

    Lets say that I want to load a very large amount of text int a textbox and watch the progress with my Progress Bar.
    How would I code that??
    Thanks

  2. #2
    Addicted Member The Phoenix's Avatar
    Join Date
    Aug 2003
    Location
    With my wife
    Posts
    142
    Do you know how much text will be loaded ahead of time? I ask because an easy way I can think to do that would be to store a variable for the length o the text in the textbox, and on every firing of the "TextChanged" event compare the new length to the stored length, and if the new length is longer, increment the Progress bar. However, there would be a point at which the progress bar would stop incrementing but text would still be added.

    If you knew the ammount ahead of time, you could say something like:

    VB Code:
    1. if txtTextbox1.text.length = LengthVar + 10 then
    2. pgrProgress.value +=1
    3. end if

    or something like that, to make sure that the progress bar ends around the same time the text loading ends.

    There is probably a much more elegant way to do that, but this is all that comes to mind right now.
    Take my love
    Take my land
    Take me where I cannot stand
    I don't care, I'm still free
    You can't take the sky from me...

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Typically you would load the text in by assigning the text to the text property of the control, this does not provide a way to show progress. If you really wanted to show progress you'd have to load it in say line by line and increment the progress bar as you did.

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Dec 2002
    Location
    Central US
    Posts
    183
    Thanks a lot for the reply!! but I'm going to lay this to rest. I will pick it back up at a later time.
    I did some research on the net and came to the conclusion that this is way way over my head.
    Once again, thanks!
    Sorry to have wasted your time with this.

    I'm new to .net and also new to vb6.
    I only made up a couple of small and insignificant programs in vb6 and am Looking for something to create in .net.

    I have just one more stupid Question!
    If I want to make something like a daily notepad how would I go about that?
    Or what would I use for storage?
    Will I have to use a database? I want to be able to use a “DateTimePicker” and enter in something a month in advance if need be.
    Is this simple enough for a Beginner?

  5. #5
    Addicted Member The Phoenix's Avatar
    Join Date
    Aug 2003
    Location
    With my wife
    Posts
    142
    I would say you could probably handle that. If you don't want to use a database, you could just write to a text file. Then, when you open your program and select a date, have the program search the text file for a date that matches, and display any data from that part of the text file.
    Take my love
    Take my land
    Take me where I cannot stand
    I don't care, I'm still free
    You can't take the sky from me...

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Dec 2002
    Location
    Central US
    Posts
    183
    Could I use something like a pre made Excel form?
    I have used something like that in vb6 once but I have forgotten how to.
    Also! Where is the Menu Editor?? I have not been able to find it yet.

  7. #7
    Addicted Member The Phoenix's Avatar
    Join Date
    Aug 2003
    Location
    With my wife
    Posts
    142
    Beats me. I know nothing about Excel at all.

    Also, here's the Menu control.
    Attached Images Attached Images  
    Take my love
    Take my land
    Take me where I cannot stand
    I don't care, I'm still free
    You can't take the sky from me...

  8. #8

    Thread Starter
    Addicted Member
    Join Date
    Dec 2002
    Location
    Central US
    Posts
    183
    Well!!
    No wonder everyone is saying it takes some getting used to.
    Thanks!!

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Dec 2002
    Location
    Central US
    Posts
    183
    Now this makes me feel a bit better I see I’m not the only one that could not find the Menu Editor or “Menu Control”
    LOL

  10. #10
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    This isn't really that hard here is an example.

  11. #11
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    another thing, putin it line by line will make the process like twice or more time consuming than loading it all at once..
    \m/\m/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width