我有一个Label和PictureBox元素,在设计师中我将可见性设置为false.
现在我试试这个:
   private void openExcelButton_Click(object sender, EventArgs e)
    {
        openExcelDialog.Filter = "Excel files|*.xls;*.xlsx;*.csv";
        DialogResult result = openExcelDialog.ShowDialog();
        if (result == DialogResult.OK) // Test result.
        {
            LoadingGIF.Visible = true;
            LoadingLabel.Text = "Loading...";
            LoadingLabel.Visible = true;
            string file = openExcelDialog.FileName;
            //more code
            LoadingGIF.Visible = false;
            LoadingLabel.Text = "Uploading Finished!";
        }
    }
现在,当按下按钮并选择一个文件时,直到我完成该//more code部分中的代码然后标签更改之前,什么都没有发生。
为什么会这样?