0

Basically I have got two projects in a same solution. Project A has a form, and on the form this is a panel. Project B's entry points is written like this:

namespace Demo
{    
    public static class Program
    {   
        [STAThread]
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }
    }
}

And my question is how do i run this project B in Project A Form's Panel? In addition Project B is a form contains a pictureBox which grabs frame from the webcam.

J. Steen
  • 15,470
  • 15
  • 56
  • 63

1 Answers1

0

If Project B is compiled to an executable, you can take a look at this question, which also provides a solution. Hint: you are trying to run a new process from your WinForms process.

Community
  • 1
  • 1
csima
  • 315
  • 2
  • 14
  • Thanks for the quick reply,my Project B is not compiled as .exe , all i want to do is to call the Project B to run in project A's panel – PotHeadProgramer Feb 24 '13 at 12:21
  • I think that you have a form in project B, which you want to show up on a trigger. In this case, you can create a new instance of that form `Form b = new FormInBProject()`, after which you call the `b.Show()` method to make it appear (see the example from [here](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.show.aspx)). Of course, you will need to add to ProjectA a reference to ProjectB. – csima Feb 25 '13 at 14:10