Constant read????

0 adrian contreras · February 18, 2015
Hey guys, I need some help. I am new to C# and I am not sure how to do something. What I need to do Is constantly read the cpu percentage and display it to a textbox, but the issue is I am using the windows form not the console so I cant use a while loop.  I think my best bet is to use an event, but iam not sure how. Can some one help Please? :)

Post a Reply

Replies

Oldest  Newest  Rating
0 mike richardson · March 24, 2015
Why cant you use a loop?
0 Eugene Botma · February 20, 2015
Try using a timer control (in the tool box, under "components"). Just drag it onto the form. You want to do your reading in the timers "tick" event. Remember to enable it.
  • 1

C#

129,952 followers
About

C# is an object-oriented language designed for improving the development of web applications.

Links
Moderators