|
-
Oct 4th, 2003, 08:46 PM
#1
Thread Starter
Addicted Member
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
-
Oct 4th, 2003, 09:38 PM
#2
Addicted Member
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:
if txtTextbox1.text.length = LengthVar + 10 then
pgrProgress.value +=1
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...
-
Oct 4th, 2003, 09:38 PM
#3
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.
-
Oct 4th, 2003, 10:36 PM
#4
Thread Starter
Addicted Member
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?
-
Oct 4th, 2003, 10:59 PM
#5
Addicted Member
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...
-
Oct 4th, 2003, 11:28 PM
#6
Thread Starter
Addicted Member
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.
-
Oct 4th, 2003, 11:37 PM
#7
-
Oct 5th, 2003, 12:05 AM
#8
Thread Starter
Addicted Member
Well!!
No wonder everyone is saying it takes some getting used to.
Thanks!!
-
Oct 5th, 2003, 12:54 AM
#9
Thread Starter
Addicted Member
-
Oct 5th, 2003, 01:51 AM
#10
This isn't really that hard here is an example.
-
Oct 5th, 2003, 07:00 AM
#11
yay gay
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|