public CustomForm(System.Drawing.Color _color, System.Drawing.Image _image, string _message) { InitializeComponent(); CustomForm_Timer.Start(); /* Start timer */ CustomForm_Panel.BackColor = _color; CustomPicBox.Image = _image; CustomLbl.Text = _message; /* Set message */ CustomLbl.TextAlign = ContentAlignment.MiddleCenter; /* Set align */ }
private void CustomForm_Timer_Tick(object sender, EventArgs e) { CustomForm_Timer.Stop(); /* Stop timer */ this.Close(); /* Close form */ }