My form has a hiccup

  • Thread starter Thread starter melton9
  • Start date Start date
M

melton9

I have a form that updates once a second. When it updates there is no
other processing going on. It generally works fine, but a few times a
min sometimes less, sometimes more it will hiccup and stall a little.
This is something I would like to smooth out.

What I have is a few different subs making calls to a webservice and
when they are done they return a true value and once all the values are
true I use begininvoke to call the update sub. There are 3 datagrids,
but they are very light weight. Does anyone else know whats going on?
I can't seem to figure it out, the app runs on about 8% of my cpu and
with all other apps off as well as a restart and testing on a different
computer it comes out the same.

Heres the refresh sub I have.




Public Sub runrefresh()

Me.DataGridView3.Refresh()
Me.DataGridView2.Refresh()
Me.DataGridView1.Refresh()
Me.Label10.Text = Sid1pl
Me.Label7.Text = Sid2pl
Me.Label8.Text = Sid3pl
Me.Label6.Text = "Ref Rate : " & time1
Select Case Sid1pl
Case Is < 0
Me.Label10.ForeColor = Color.Green
Case Is > 0
Me.Label10.ForeColor = Color.Red
End Select
Me.Label2.Text = "Total Matched : " & TotalMatched
End Sub
 
Melton,

Something gives me the idea that your UI action is running on a different
thread, is that as it is, just to inform others?

Cor
 
I have a timer setup to check to see if all values are true so I can
fire the begininvoke, this timer is set to 50ms. However, when all
values are true I disable the timer during the updating.
 
Which timer are you using?

Have you profiled the application to see what's taking so long?
 
Back
Top