kejpa Posted March 21, 2005 Posted March 21, 2005 Hi, I want my GUI to be responsive even if the app is waiting for a temperature to be set. I guess I should be using some callback or async function but I'm not sure how and which function to use. This is my idea of work flow ' Set temp +60° ' Wait for temperature to be stable while temp>-20° ' Do Magic! ' Order temp Change -2° ' Wait for temperature to be stable loop There are two places in the loop where I need to wait, the first where I wait for the referece temperature to change and the second where I need to wait until the our temperature sensor reports a stable temperature. Any help appreciated! TIA /Kejpa Quote
yraykar Posted March 21, 2005 Posted March 21, 2005 Threads Hi, Not sure whether this really helps u. You can use the Threading in .net to do the same. If you search in this forum or in internet you will find examples of threading. I am sorry i cannot search now and give a ready example but you can find it over the internet. Regards Yashasvi Quote
mskeel Posted March 21, 2005 Posted March 21, 2005 Another possibility might be to set up a custom event to fire when you receive a temperature update. an OnTemperatureUpdate event or something. How is your app receiving updates? Is it user input? Real time from an external device (digital thermometer)? Quote
kejpa Posted March 22, 2005 Author Posted March 22, 2005 Thank you all for bearing with me.... Of course I should raise an event in the class where the temp is measured and have it in a separate thread. I must have been really tired yesterday.... Thanx a bunch! /Kejpa Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.