I have a control form
derived from a windows User Control class. I need to show a message box
based on a condition once the form displayed. I tried to use the form paint event handler
to do this but it seems firing twice. As a result message box
displayed twice. How can this be done?
public partial class SelectAccounts : UserControl
{
private void SelectAccounts_Paint(object sender, PaintEventArgs e)
{
MessageBox.Show("something");
}
}