Vb net textbox not updating


When I was using VB6 this would have been handled using Do Events.

vb net textbox not updating-65vb net textbox not updating-9

The problem is that it doesn't update the "text box" until the very last record has been processed - rather than displaying an incremental count. The procedure doesn't really do anything here, but the problem is the same. And if you put some real processing in the loop, you WILL see a meaningful number. Meyers-Jouan" id="ctl00_m_m_i_ctl00_gr_ctl01_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3135881" / Ron, You're running into a classic problem. Value = i Do Events Next Having said that, you're not doing anything else in the loop either. Martin" id="ctl00_m_m_i_ctl00_gr_ctl07_bestanswerbody" class="textarea-bestanswerhidden" name="bestanswerbody" answerbody Id="3135945" / For i = 1 To 10000 show Count.

It's like VBA can't be bothered to update the form "text box" until after its finished. While the VBA code is executing, it has control of the processor, so there's no time for the other processes (such as the one that updates the display) to execute. Value = i If I mod 10 = 0 then Do Events End if Next You really don't need to process all Windows' messages with each pass of the loop.

NET - Frontend for automated builds It should, but if the code executes too fast then you will not see the update.

I ran into this problem with one of my apps and had to use the Application. Click (rate this post) under my name if I was helpful. Do Events method has the same behavior as the Do Events method. Click (rate this post) under my name if I was helpful.

Thanks PHP PHP Image Gallery v1.0 PHP Image Gallery v2.0 VB 2005 Find Computers on a network Simple License Encryption SQL Server Database Access dll Use Reflection to Return Crystal Report Document Silently Print PDF Generic Xml Serailizer MSDN (The first and foremost) MSDN Design Guidelines API Reference Inno Setup Compiler Inno Setup Preprocessor ISTool - Fairly easy to use GUI for creating inno setup projects Connection Strings NAnt -Automated Builds Cruise Control . Click (rate this post) under my name if I was helpful.