473,395 Members | 1,762 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,395 software developers and data experts.

TextBox.update - problem

For i = 1 to 5000
Me.txtCounter.text = i
'As I found the textbox didn't update itself, I add
(Me.txtCounter.update)
'.... some calculation statment
end for

Me.txtcounter.update sometimes work , sometimes doesn't ,
I saw the textbox show "289" and then stop , but the statment runs very
well.
Does anymethod to push the textbox must show the correct value,
Thanks
Nov 21 '05 #1
6 4289
Agnes,

You don't have option strict on.

I advice you to do that in every program.

At least you would see that this is better as

For i = 1 to 5000
Me.txtCounter.text = i.ToString
'As I found the textbox didn't update itself, I add
(Me.txtCounter.update)
'.... some calculation statment
end for

However it will not be showed, for that you need a txtCounter.show or an
application.doevents in it, which slows up the procedure because it has to
be painted. Therefore if you do it, do it than in amount the user can see
(by instance test if the mod divide by 10 = 0)

I hope this helps,

Cor
Nov 21 '05 #2
"Agnes" <ag***@dynamictech.com.hk> schrieb:
For i = 1 to 5000
Me.txtCounter.text = i
'As I found the textbox didn't update itself, I add
(Me.txtCounter.update)
'.... some calculation statment
end for

Me.txtcounter.update sometimes work , sometimes doesn't ,
I saw the textbox show "289" and then stop , but the statment runs very
well.
Does anymethod to push the textbox must show the correct value,

Your code should work, it works for me when changing the 'End For' to 'Next
i'.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
YES. i didn't set it..
Where Should I set it ??
in fact.. What does it mean 'option strict on ' ??

"Cor Ligthert" <no************@planet.nl> ¼¶¼g©ó¶l¥ó·s»D:eJ**************@tk2msftngp13.phx.g bl...
Agnes,

You don't have option strict on.

I advice you to do that in every program.

At least you would see that this is better as

For i = 1 to 5000
Me.txtCounter.text = i.ToString
'As I found the textbox didn't update itself, I add
(Me.txtCounter.update)
'.... some calculation statment
end for

However it will not be showed, for that you need a txtCounter.show or an
application.doevents in it, which slows up the procedure because it has to
be painted. Therefore if you do it, do it than in amount the user can see
(by instance test if the mod divide by 10 = 0)

I hope this helps,

Cor

Nov 21 '05 #4
"Agnes" <ag***@dynamictech.com.hk> schrieb:
YES. i didn't set it..
Where Should I set it ??
in fact.. What does it mean 'option strict on ' ??


Open the documentation and read the chapter about 'Option Strict'. You can
set it on top of each source file or in the project properties for the whole
project.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5
Agnes,

You can set on every program file in Top
Option Strict On
Or you can set it in the general options, in your case I would start with
setting it on every page.

The why is say it simple.

If you have it off, than the computer searches at runtime the best format
(type) to use (late binding).
With option strict on you have to do that yourself direct.

The advantage is that there are no wrong types taken at runtime.
(And because of the fact that it has not to be searched for, goes faster)

I hope that this gives an idea

Cor
Nov 21 '05 #6
"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:e7**************@tk2msftngp13.phx.gbl...

Force the textbox to redraw itself, as in

For i As integer = 1 to 5000
Me.txtCounter.Text = i.ToString()
Me.txtCounter.Refresh()

'.... some calculation statment
Next

(Or, better still, put the call to Refresh into the TextBox's
Changed Event Handler).

HTH,
Phill W.
Nov 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Amadelle | last post by:
Hi all and thanks in advance for your help, I have a problem with capturing the changed value of a text box in a datagrid. The datagrid is populated based on a dataset and I am using template...
3
by: Nic | last post by:
Hey, I have an ASP-application. In the ASPX I have an <asp:dropdownlist ..>. Now when I leave this control I want to initialisize some other fields. In window forms we uses the onleave event but...
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...
3
by: Joriz | last post by:
i have a textbox that i need to edit. First i populate it with the data from my sql table. afterwards i make changes on them.. and then when i clicked the save button, i noticed that the textbox...
7
by: Peter D.C. | last post by:
Hi I want to update data hold in several textbox controls on an asp.net form. But it seems like it is the old textbox values that is "re-updates" through a stored procedure who updates a SQL...
6
by: Frank | last post by:
Hopefully this is the correct group for this message. My previous post to (I assume) a non-.net group was not welcomed. I have a form with 7 text boxes that are all bound to fields of a...
6
by: JohnR | last post by:
I have a table with 1 row which is used to hold some application wide items (one item per field, hence I only need 1 row). I want to bind one of the fields to a textbox. After setting up the...
3
by: nvx | last post by:
Hello everyone... Just for the record, I'm a newbie to this data binding thing... In my C# application I need to bind a cell of an Access database table to a multiline TextBox. How should I do...
1
by: AssOnFire | last post by:
Hello, I have bound a textbox to a CustomerName column of my DB, using the data binding property, and selected it from the DataTable. when i change the text in the texbBox, i try to update the...
2
by: Eric | last post by:
Hi, There is a textbox which contains some text. The purpose is to update the text manually into the textbox and send (update) the updated text to the database. My problem is that when i...
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?
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
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,...
0
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,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...

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.