Visual Basic and WPF

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
 
F

Family Tree Mike

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.
 
R

Ricardo Furtado

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.
 
H

Herfried K. Wagner [MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top