473,406 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

TextBox Update inside of a loop (.Net 1.1) / VS 2003

Hello,

I have a simple loop that adds values to a textbox. I would like to have it refresh the text box every 100 records so that the end user still believes it is processing data (it sometimes crunches several thousand records). I don't have the .refresh method for a textbox in .Net 1.1. How was this accomplished prior to 2.0? Below is an example of the behavior simiar to what I want.

Thanks in advance


for i = 0 to 1000

textBox.Text = i
textBox.refresh()
System.Threading.Thread.Sleep(200)

Next
Jul 2 '08 #1
5 4274
debasisdas
8,127 Expert 4TB
what do you want this code textBox.refresh() to do ?

what is the use of refreshing a textbox inside a loop ?
Jul 3 '08 #2
I have some code that processes some numbers (several thousand at a time). I would like to update the end user of the progress so they don't wait for 5+ minutes while it assembles this list. Basically my code takes input from one list and then sorts it and puts it in one of 3 lists classifying if they are valid, invalid, incomplete. Within this loop I would like the code to update the text box so the user can visually see that the code is working rather than waiting several minutes for the code to complete.

Does that make sense? The big question is.... I don't have access to the .refresh method for a textbox. I'm using Dot Net 1.1 with VS 2003. I'm wondering if they offered the ability to do something similar with older code.


Thanks
Jul 3 '08 #3
QVeen72
1,445 Expert 1GB
Hi,

When it is being continously changing, add "DoEvents"


for i = 0 to 1000
textBox.Text = i
DoEvents
System.Threading.Thread.Sleep(200)
Next

I guess, if you are wanting to Display, the Position/Record Count in a loop like that, "StatusBar" is the best control. It auto refreshes itself, and dosent flicker or gets blurred..

Regards
Veena
Jul 3 '08 #4
In my version of DotNet (1.1) I don't have a statusbar control. I also don't have the DoEvents Method to call in the function. I may need to directly reference it similar to the sleep function. Do you know the full path of DoEvents or the statusbar?

Example (System.Threading.Thread.Sleep)

Thanks
Jul 3 '08 #5
QVeen72
1,445 Expert 1GB
Hi,

Sorry for replying so late..

in VB.net it is :
Application.DoEvents

and StatusBar is called as StatusStrip in VB.net. It is available in General ToolBox under "Menu and ToolBars"

Regards
Veena
Jul 25 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Sonoman | last post by:
Hello all: What is wrong with my code? I want it to update the new text on the textbox on every iteration of my loop. But instead the textbox updates all info at the end of the loop. I also have...
1
by: etantonio | last post by:
Good Morning, I still havent solved my problem with a textbox inside an editItemTemplate of a datalist, in fact now it is filled with the word "CIAOOOOOO" , if a runtime in the form I put a...
14
by: Mike L | last post by:
This is for a Winform. What is the code to send text to a text box in another form? In my search form when the user click OK, I want to sent a string to a text box in frmDataEntry. The code I...
28
by: kfrost | last post by:
I know this is probably simple but I have a C# form and the class for the form is called sbaSynch. I have a textbox name txtServerName. I'm creating a class to manipulate XML functions so I...
2
by: hamil | last post by:
I have a form with a text box, a thread start button, and a seperate thread. This is a TCP listener (server) example I took out of a book. See the code below. In the loop below, look at the two...
2
by: simon | last post by:
hello, new to vb.net, have a few questions about DataGrid. I have a dataGrid that is working pulling a dataset back from a stored proc and binding to the datagrid for display the datagrid's...
3
by: Billy Bob | last post by:
Hello I'm wanting to run through a for loop, and update a text box control to the value as I loop through, but the only value thats's ever displayed in the text box is that last value of the...
0
KalariaNitya
by: KalariaNitya | last post by:
Hello, could anybody help me? i have gridview, inside gridview i have one Update button & textbox update button update the quantity entered in textbox. i want to update the quantity on textbox on...
5
by: =?Utf-8?B?RmFtaWx5IFRyZWUgTWlrZQ==?= | last post by:
I'm sorry, but I've read your code a couple of times and just don't see where the Form1 is initialized. Form1 also sounds like a class name, and this would be how you could do some form operations...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.