0
I’m trying to create a Usercontrol so you can call different Forms, however changing only the controls he make the call.
Shows the error that the "Form" is non-existent.
public partial class campos_busca : UserControl
{
public Form Formulario
{
get; set;
}
public campos_busca()
{
InitializeComponent();
}
private void Campos_busca_Load(object sender, EventArgs e)
{
}
private void TextBox1_MouseDoubleClick(object sender, MouseEventArgs e)
{
Formulario f = new Formulario();
}
The "Form" field is variable, e.g.: Define "Form Form = Frm_products" When the Doubleclick event triggers it would be like: Frm_products f = new Frm_products(); f. Showdialog(); When to set "Form Formulario = Frm_employee": Frm_employee f = new Frm_employee(); f. Showdialog();
– Marcos ACR