-1
private void hide()
{
  pictureBox1.Visible = true;
  pictureBox2.Visible = true;
}

private void kontrol()
{
  hide();
  //i want to work that hide () with 1 second delay ? How its possible?    
}

Delayed function calls I tried all ways in this topic, always error

LarsTech
  • 80,625
  • 14
  • 153
  • 225
  • 2
    You need to use a timer and / or a queue. The linked question is a good start. What errors do you get? – xxbbcc Dec 02 '19 at 16:35
  • `always error` Show us the code that produced the error, and tell us the error. You would get better help. – LarsTech Dec 02 '19 at 16:35

1 Answers1

2

You can use async / await in a func Like This :

  private async void kontrol()
  {
   pictureBox1.Visible = false;
   pictureBox2.Visible=false;
   await Task.Delay(1000);
   pictureBox1.Visible = true;
   pictureBox2.Visible=true;
 }
Mohammad
  • 1,549
  • 1
  • 15
  • 27