Registros.FrmRegistroProducto Producto = new Registros.FrmRegistroProducto(); Producto.ShowDialog();
The problem is solved, just put the name of the folder in front of you.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello everyone, I am starting programming in c Sharp
I have a form called: frmRegistroProducto, but it is inside a folder called: Records.
I have a Second form called: FrmMenu, but it is not inside a folder.
From the second form: FrmMenu, through a button I try to call or invoke the first form: FrmProducto, but it gives me an error.
I count on your help
Registros.FrmRegistroProducto Producto = new Registros.FrmRegistroProducto(); Producto.ShowDialog();
The problem is solved, just put the name of the folder in front of you.
Hi @ELIRDFUL , Welcome to Microsoft Q&A,
That's a namespace problem.
When you put it inside a folder, it can't get the target file. They must be in a namespace to be used directly.
I created a demo example:
You can see that Form2 is in Demo.Test and Form1 is in Demo.
You can either use Test.Form2 directly or add using Demo.Test to it.
Best Regards,
Jiale
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.