Как я могу автоматически обновлять форму С#? ⇐ C#
-
Гость
Как я могу автоматически обновлять форму С#?
Hi im new at c# and im trying to make like a messagebord.
The goal here is that a person can write in a rtf document and save it and it should be visible on another computer in my program. The problem is that I can't get my program to refresh so that the new text is displayed.
I have tryed this that i found here but it wont work. It gives me an error cs8622
using System.Windows.Forms; namespace messageboard { public partial class Form1 : Form { public Form1() { InitializeComponent(); board.LoadFile(@"C:\Users\steve\Desktop\test.rtf"); } private void Form1_Load(object sender, EventArgs e) { System.Windows.Forms.Timer timer1 = new System.Windows.Forms.Timer(); timer.Interval = (10 * 1000); // 10 secs timer.Tick += new EventHandler(Timer_Tick); timer.Start(); } private void Timer_Tick(object sender, System.EventArgs e) { //refresh here... } } }
Источник: https://stackoverflow.com/questions/781 ... tomaticlly
Hi im new at c# and im trying to make like a messagebord.
The goal here is that a person can write in a rtf document and save it and it should be visible on another computer in my program. The problem is that I can't get my program to refresh so that the new text is displayed.
I have tryed this that i found here but it wont work. It gives me an error cs8622
using System.Windows.Forms; namespace messageboard { public partial class Form1 : Form { public Form1() { InitializeComponent(); board.LoadFile(@"C:\Users\steve\Desktop\test.rtf"); } private void Form1_Load(object sender, EventArgs e) { System.Windows.Forms.Timer timer1 = new System.Windows.Forms.Timer(); timer.Interval = (10 * 1000); // 10 secs timer.Tick += new EventHandler(Timer_Tick); timer.Start(); } private void Timer_Tick(object sender, System.EventArgs e) { //refresh here... } } }
Источник: https://stackoverflow.com/questions/781 ... tomaticlly
Мобильная версия