PictureBox visible property does not work… help please

前端 未结 3 1627
北荒
北荒 2021-01-13 00:10

I am using window app and C#.. i have a picture which is invisible at the start of the app.. when some button is clicked, the picture box has to be shown..

i use thi

3条回答
  •  感情败类
    2021-01-13 00:57

    To avoid using multi-threading, all you can do is pictureBox1.Refresh(); after pictureBox1.Visible = true; as below:

    private void save_click(object sender, EventArgs e)
    {
        pictureBox1.Visible = true;
        pictureBox1.Refresh();
    
        //does the work here 
        //storing and retreiving values from datadase
    
            pictureBox1.Visible = false;
    }
    

提交回复
热议问题