473,562 Members | 2,619 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

12 New Member
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.Threadin g.Thread.Sleep( 200)

Next
Jul 2 '08 #1
5 4280
debasisdas
8,127 Recognized Expert Expert
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
ssouhrada
12 New Member
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 Recognized Expert Top Contributor
Hi,

When it is being continously changing, add "DoEvents"


for i = 0 to 1000
textBox.Text = i
DoEvents
System.Threadin g.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
ssouhrada
12 New Member
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.Threadi ng.Thread.Sleep )

Thanks
Jul 3 '08 #5
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Sorry for replying so late..

in VB.net it is :
Application.DoE vents

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
12799
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 to scroll down to see the last entries. Once I get it to work the way I want is there a property that will always keep that last entry visible? I...
1
4543
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 different word like "PIZZAAAA" this new word is not available in the Update_Command following :
14
802
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 have below does not work. private void cmdOk_Click(object sender, System.EventArgs e) { frmDataEntry f = new frmDataEntry(); f.txtDealerInfo.Text...
28
4307
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 added a class to project and it's named XmlApi(). In the XmlAPI() class I have simple code as following XmlAPI() { string str = "Some Text";
2
6221
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 lines I have marked with a comment of ??????? If I don't write to the text box, I have a fast response. The value "returnedData" is written to the...
2
12568
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 first column is a textbox(TemplateColumn), the other 3 columns are just display(BoundColumn). (1) if the value of the textbox is 0, then i'd like to...
3
19653
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 counter. Am I missing something??? As I step into the code, I can see the textbox1 test gets update, but I never see it in the actual text box ...
0
2525
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 ENTER event. i had done below code: page_load()
5
2349
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 in vb6, but not in .Net. This would explain why the messagebox works, as it is not instantiated, but called statically as you did in your code. ...
0
7655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7577
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7869
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7627
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5477
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5193
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1191
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
903
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.