Visual Basic and WPF

  • Thread starter Thread starter Ricardo Furtado
  • Start date Start date
R

Ricardo Furtado

I have a solution with a visual basic 2008 project and a WPF implemented with
C# and i need to call the wpf project from inside the vb project, in run
mode. Is it possible? how?
Do i need to call the Shell method? isn't there a better way, so i don't
need to identify the place where the wpf .exe file is, since their in the
same project?

My thanks in advanced
 
I have a solution with a visual basic 2008 project and a WPF implemented with
C# and i need to call the wpf project from inside the vb project, in run
mode. Is it possible? how?
Do i need to call the Shell method? isn't there a better way, so i don't
need to identify the place where the wpf .exe file is, since their in the
same project?

My thanks in advanced

The default location to launch an application would be the same folder.
Just copy the WPF exe to the same folder as your vb application. I
would use System.Diagnostics.Process, rather than Shell() though.

You might also consider adding a reference to your WPF project in your
vb project. Yes, you can add a reference to an executable project. Now
you can instantiate your executable's main class.
 
Awsome. Thanks a lot for your help

Family Tree Mike said:
The default location to launch an application would be the same folder.
Just copy the WPF exe to the same folder as your vb application. I
would use System.Diagnostics.Process, rather than Shell() though.

You might also consider adding a reference to your WPF project in your
vb project. Yes, you can add a reference to an executable project. Now
you can instantiate your executable's main class.
 
Ricardo said:
I have a solution with a visual basic 2008 project and a WPF implemented with
C# and i need to call the wpf project from inside the vb project, in run
mode. Is it possible? how?
Do i need to call the Shell method? isn't there a better way, so i don't
need to identify the place where the wpf .exe file is, since their in the
same project?

You may want to set a reference to the C# project from within the VB
project and directly access the classes exported by the C# assembly.
 
Back
Top