Как я могу автоматически обновлять форму С#?C#

Место общения программистов 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
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C#»