Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 5th, 2008, 5:45 AM   #1
mattireland
Hobbyist Programmer
 
mattireland's Avatar
 
Join Date: Jul 2007
Location: Wales, United Kingdom
Posts: 190
Rep Power: 2 mattireland is on a distinguished road
Send a message via MSN to mattireland Send a message via Skype™ to mattireland
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
__________________
Matt Ireland
http://www.mattireland.org
matt@mattireland.co.uk
mattireland is offline   Reply With Quote
Old Jan 5th, 2008, 3:55 PM   #2
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 747
Rep Power: 3 Jimbo is on a distinguished road
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>
Jimbo is offline   Reply With Quote
Old Jan 5th, 2008, 4:00 PM   #3
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,799
Rep Power: 5 Sane will become famous soon enough
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?
Sane is offline   Reply With Quote
Old Jan 6th, 2008, 7:01 AM   #4
mattireland
Hobbyist Programmer
 
mattireland's Avatar
 
Join Date: Jul 2007
Location: Wales, United Kingdom
Posts: 190
Rep Power: 2 mattireland is on a distinguished road
Send a message via MSN to mattireland Send a message via Skype™ to mattireland
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?
__________________
Matt Ireland
http://www.mattireland.org
matt@mattireland.co.uk
mattireland is offline   Reply With Quote
Old Jan 6th, 2008, 7:14 AM   #5
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Posts: 1,799
Rep Power: 5 Sane will become famous soon enough
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.
Sane is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:43 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC