Groups | Blog | Home
all groups > vb.net > february 2005 >

vb.net : Cannot refresh the textbox.text


Chris, Master of All Things Insignificant
2/3/2005 9:24:18 AM
I take it the function is long and processor intensive?

Try Application.Doevents before the CalCompany function.

Chris


[quoted text, click to view]

jo0ls
2/3/2005 4:21:20 PM
"Agnes" <agnes@dynamictech.com.hk> wrote in news:ea6QYOgCFHA.3324
@TK2MSFTNGP15.phx.gbl:

[quoted text, click to view]

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.
Cor Ligthert
2/3/2005 5:05:19 PM
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

Agnes
2/3/2005 11:18:19 PM
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
.....................

chanmmn
2/3/2005 11:33:20 PM
what is pReportId?

chanmm


[quoted text, click to view]

AddThis Social Bookmark Button