2
I need to make the event click a button located on a form, open another modal form. While the other form is loaded, I need to display a message to the user in a Statuslabel of a Statusstrip. (an msg of type... Wait for configuration to load...)
The behavior I noticed is that the message displayed to the user is always loaded after the modal form is opened, operated by the user and then closed. The secure click event to display the message to the user until the modal of the other form is closed.
I tried to use a Backgroundworker inside the click event, both to update the UI with a message, and to try to open the other modal form, but it didn’t work.
private void btnEdit_Click(object sender, EventArgs e)
{
modelStatusLabel.BackColor = Color.FromArgb(192, 255, 192);
modelStatusLabel.ForeColor = Color.Green;
modelStatusLabel.Text = "Por favor aguarde a configuração ser carregada...";
FormAddModel frmAddModelo = new FormAddModel(this, nameConfigFile);
frmAddModelo.ShowDialog(this);
}
How can I do this?
Obs: modelStatusLabel
is an object of the type ToolStripStatusLabel
.
@Caffè,
modelStatusLabel
is an object of the typeToolStripStatusLabel
– Emerson
@Caffé Thanks. Perfect worked.
statusStrip1.Refresh();
– Emerson