Hello to all. Please tell me whether you can set the priority of the download. The fact is that I have a UserControl, on which the background, the PNG format, and the text stand. When this control opens, a small blink is obtained. As I think the text loads faster than the picture. It is not very beautiful. Of course, I mean that it can be solved with the help of threads. But I hope you have another option. thank

private void butNext_Click(object sender, EventArgs e) { ContRegistr contReg = new ContRegistr(); // Ссылка на Контрол try { _view.CloseControl(this); // Закрываю текущий контрол _view ,это класс. CloseControl() метод // Цифры в методе, это размер и локация контрола. мне лень постоянно настраивать в ручную _view.OpenControl(contReg, 800, 600, 200, 190); // Открываю Новый контрол contReg . } catch(Exception ex) { MessageBox.Show(ex.Message); } } 
  • Is this your WinForms or WPF? - VladD
  • @VladD WinForms - Gennady Pisarev

1 answer 1

With the help of threads, this cannot be solved - all rendering should occur in the main stream.

Try setting DoubleBuffered property to true

  • Thanks for the reply, it did not help. I stood in true - Gennady Pisarev
  • @Gennady Pisarev then show the minimum code for playback. Suddenly it does not flicker, and it just seems to you :) - PashaPash
  • I added a code to the question - Gennady Pisarev