A program like a chat. At some frequency, it reads information from a file on the server, which causes a problem - the scrollbar scrolls to the beginning of the chat each time. Help solve this problem Excerpt of the method:
private void enter_button_Click(object sender, EventArgs e)// Считывание с файла { DateTime date = DateTime.Now; string message = " "; message = enter_chat.Text; if (message != " " && message != "" && message != " " && message != " ") { List<string> file = DownloadFileFromServer("http://fschat.ucoz.net/fs_chat.txt", "Task").ToList<string>(); file.Add("element"); file.Add(nickname); file.Add(message); file.Add(date.Hour + ":" + date.Minute); File.WriteAllLines("fs_chat.txt", file); UploadFileToServer("fs_chat.txt", "fschat.ucoz.net/fs_chat.txt"); } else { MessageBox.Show("Ошибка: пустая строка"); } enter_chat.Clear(); }