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

Cannot refresh the textbox.text

Before I run a function, i will put the string in a textbox. However, I
found that the messagebox show the correct value.
BUT the textbox show nothing. Finally, after the function 's process is
completed. the value will be shown in the textbox.
How Can i correct it ?
thanks a lot

Me.txtReportId.Text = Me.pReportId
messagebox.show(Me.txtReportId.Text )
Me.CalCompany() <-- function
Me.pgbProcess.Value = 0
.....................
Nov 21 '05 #1
4 1379
I take it the function is long and processor intensive?

Try Application.Doevents before the CalCompany function.

Chris
"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:ea**************@TK2MSFTNGP15.phx.gbl...
Before I run a function, i will put the string in a textbox. However, I
found that the messagebox show the correct value.
BUT the textbox show nothing. Finally, after the function 's process is
completed. the value will be shown in the textbox.
How Can i correct it ?
thanks a lot

Me.txtReportId.Text = Me.pReportId
messagebox.show(Me.txtReportId.Text )
Me.CalCompany() <-- function
Me.pgbProcess.Value = 0
.....................

Nov 21 '05 #2
what is pReportId?

chanmm
"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:ea**************@TK2MSFTNGP15.phx.gbl...
Before I run a function, i will put the string in a textbox. However, I
found that the messagebox show the correct value.
BUT the textbox show nothing. Finally, after the function 's process is
completed. the value will be shown in the textbox.
How Can i correct it ?
thanks a lot

Me.txtReportId.Text = Me.pReportId
messagebox.show(Me.txtReportId.Text )
Me.CalCompany() <-- function
Me.pgbProcess.Value = 0
.....................

Nov 21 '05 #3
Agnes,

Beside the answer from Chris can you try as well when the form is already on
the screen.

\\\\
me.txtReportId.show
////

I hope this helps?

Cor
Nov 21 '05 #4
"Agnes" <ag***@dynamictech.com.hk> wrote in news:ea6QYOgCFHA.3324
@TK2MSFTNGP15.phx.gbl:
Before I run a function, i will put the string in a textbox. However, I found that the messagebox show the correct value.
BUT the textbox show nothing. Finally, after the function 's process is completed. the value will be shown in the textbox.
How Can i correct it ?
thanks a lot

Me.txtReportId.Text = Me.pReportId
messagebox.show(Me.txtReportId.Text )
Me.CalCompany() <-- function
Me.pgbProcess.Value = 0
.....................


compare these two:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.TextBox1.Text = "blahblahblah"
System.Threading.Thread.Sleep(3000) 'pause for 3 seconds
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Me.TextBox2.Text = "blahblahblah"
Me.TextBox2.Update()
System.Threading.Thread.Sleep(3000) 'pause for 3 seconds
End Sub
The update in the button2_click sub updates the textbox there and then.
Otherwise the textbox isn't redrawn until the sub finishes.
Nov 21 '05 #5

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

Similar topics

1
by: maria | last post by:
Hi I hope some one can help me I have a table of type <asp:Table>. This table is filled in runtime with labels and textboxes(also server controls). I have written a function i jscript since...
1
by: JBD | last post by:
Hi, I have a button that fires the below sub routine. This works fine if the user clicks the button as they are supposed to, even if they click it repeatedly. However, if you click "refresh" on...
1
by: ppatel | last post by:
Problem I have a problem with web image button control click event. The click event does not get trigger until it has not been clicked once or page refresh occures(which is fine). When click...
1
by: ericvdb | last post by:
Hi all, I'm trying to fill a PDF form with asp.net using the FDF Toolkit. I have a simple form with a textbox and a button. When the button is clicked, the pdf should open with the field filled...
3
by: Steve Wark | last post by:
I have created a ASP.NET application and created two forms within the application (Webform1.aspx & Webform2.aspx). On the first form I have placed a textbox (TextBox1) and a button, which when...
7
by: Juan Romero | last post by:
Hey guys, please HELP I am going nuts with the datagrid control. I cannot get the damn control to refresh. I am using soap to get information from a web service. I have an XML writer output...
0
by: Luqman | last post by:
I have copied the following code from Internet, and copied it to a file named : test.aspx, and copied that file to c:\Inetpub\wwwroot Directory. When I type on my Internet explorer:...
8
by: Radx | last post by:
Here in my web application, I have a data entry page with serval controls. Some of the controls have autopostback is set true. But the problem is when two or more people are entering data at the...
5
by: tshad | last post by:
I have an interface I am using to get access to some of the objects on my form: a textbox (Status) and my statusbar (StatusBar). In my class, which is actually in another class from my form I have...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.