473,395 Members | 1,383 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.

My form has a hiccup

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

Jun 19 '06 #1
4 1109
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

<me*****@hotmail.com> schreef in bericht
news:11**********************@p79g2000cwp.googlegr oups.com...
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

Jun 19 '06 #2
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.

Jun 19 '06 #3
Which timer are you using?

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

me*****@hotmail.com wrote:
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.


Jun 19 '06 #4
I'm using systems.timers.timer, no I haven't profiled it.

Jun 19 '06 #5

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

Similar topics

3
by: John | last post by:
Dear all, It been more than 3 days I am trying to debug this program, I interpret it using activePerl and it is giving (perl -wc code_process.pl) no error syntax but when I put it online, change...
5
by: Richard Cornford | last post by:
I am interested in hearing opinions on the semantic meaning of FORM (elements) in HTML. I have to start of apologising because this question arose in a context that is not applicable to the...
4
by: Targa | last post by:
Trying to total some price fields in a form but doesnt work when all the referenced form fields dont exisit. This is for an invoice - pulled prom a database and the form doesnt always contain the...
7
by: Nathan Bloomfield | last post by:
Hi All, I am hoping someone out there will be kind enough to find out where my code is going wrong. The current code is inefficiant but hopefully it will convey the data I require to be...
20
by: Daniel Kaplan | last post by:
Hey All, In some of my pages I use a quick form to give navigational button choices, rather than links. One of them is this: <FORM name="nulltry" enctype="multipart/form-data"...
5
by: apinti | last post by:
Here is my code, and the problem: $st="...(string to post is formed from different variables read from file)..."; $lngth=strlen($st); $ch = curl_init(); curl_setopt($ch,...
13
by: PW | last post by:
Hi, This is bizarre. I've check and rechecked the spelling, cut and paste the name of the form (when trying to rename the form) and the control yet I still get a parameter prompt when the form...
6
by: KDCinfo | last post by:
Although I'm making an ajax call, this is really a javascript question (although it could be even more of an HTML or DOM question... not exactly sure) I'm doing an ajax call to a remote php...
9
by: RvGrah | last post by:
I'm completely new to using background threading, though I have downloaded and run through several samples and understood how they worked. My question is: I have an app whose primary form...
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:
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
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...

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.