![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
|
Rapid 'Refresh'
Hi,
I used to have this really good way of 'refreshing' a data value continuously e.g. if x + y = z but x and y were constantly changing then this equation would need to be continually redone. Except I've forgotten it. Any suggestions? Thanks! Matt. I |
|
|
|
|
|
#2 |
|
Battle Programmer
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 742
Rep Power: 3
![]() |
Re: Rapid 'Refresh'
So, do you mean that z needs to be recalculated every time it's accessed? You could make it a readonly property, where the get is just to return x+y. Or am I misunderstanding somehow?
__________________
<insert disclaimer here> <insert shameless plug for Visual Studio here> |
|
|
|
|
|
#3 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,791
Rep Power: 5
![]() |
Re: Rapid 'Refresh'
Is the data value that's constantly changing a mathematical statement? Is it the result of a function call? Could be anything at all?
Or just plain x+y? |
|
|
|
|
|
#4 |
|
Hobbyist Programmer
|
Re: Rapid 'Refresh'
Sorry for being unclear. I was using x + y = z as a bad example.
Suppose z was the temperature of the CPU or something. Could I make it so it was constantly updating? |
|
|
|
|
|
#5 |
|
Programming Guru
![]() Join Date: Apr 2005
Posts: 1,791
Rep Power: 5
![]() |
Re: Rapid 'Refresh'
Oh. Well in around 5 lines of code or less, I suspect you can write a function called "showCpuTemperature", that updates the value of the display every time it's called with the most recent CPU Temperature.
Then set a timer event for that function to execute every 500ms or so. The specifics of how to do this in Visual Basic .NET are unknown to me, but this is a common tool in GUI programming and thus should be fairly simple to research. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| refresh | kishou | HTML / XHTML / CSS | 6 | Jun 27th, 2007 5:46 PM |
| PHP sessions/ page refresh??? | ktsirig | PHP | 2 | Jun 1st, 2006 4:16 PM |
| Homepage Refresh | hoffmandirt | Community Announcements and Feedback | 4 | Apr 18th, 2006 5:04 PM |
| Force Image Refresh | Ghost | JavaScript and Client-Side Browser Scripting | 3 | Dec 2nd, 2005 11:12 AM |
| Refresh winform | HappyTomato | C# | 1 | Jul 18th, 2005 3:40 PM |