Real time data value display in C#

后端 未结 3 905
春和景丽
春和景丽 2021-01-28 23:42

Simple C# question: I was trying to design a simple C# DLL that uses a third party library to stream images from a digital camera.

Really beginner C# programmer here, so

相关标签:
3条回答
  • 2021-01-29 00:05

    The simplest (assuming you can't just update when new data arrives) would be to add a forms timer to your form, and update the UI in the timer "tick" event.

    http://msdn.microsoft.com/en-us/library/system.windows.forms.timer.aspx

    0 讨论(0)
  • 2021-01-29 00:16

    a label is very good approach but you have to make sure you are avoiding from application does not respond, so also add a line of code that lets the form process its queue

    lblNumber.Text = number;
    Application.DoEvents();
    
    0 讨论(0)
  • 2021-01-29 00:17

    I would have a Label control (assuming winforms) whose text property I would set to the value of the counter whenever it incremented.

    counter++;
    myLable.Text = counter;
    
    0 讨论(0)
提交回复
热议问题