Run project from another project

mikin

New member
Joined
Oct 1, 2005
Messages
2
Programming Experience
1-3
I have added existing project in my solution. Then I have rebuilded solution, but I don´t know how to run this project (or some form in this project) from my original project. Can you hlep me please
 
Is the project you added an application or a library? You need to add a reference to your existing project that points to the new project, but you can only do that if the new project is a library.
 
I am going to guess that this is what you meant. I put this in as a new project just to verify I had all of the necessary includes. You can copy the sub and includes into your existing application and it should run. The Call should be put where you want to call the application and should look something like this:

runapp("\SD Card\CCClark\CCClark_RSS.exe")
This will run a program I have residing on my SD card in folder CCClark called CCClark_RSS. It first checks to see if the program is running and if it is, switches to it rather than starting a new instance of the program.
AppActivate(Applicationname)
Then if the AppActivate fails, it will verify that my program object exists and call it using the processstartinfo.
If you need to use parms, check the associated values under prosessinfo.

Hope that this helps...



Imports
System.IO
Imports System.reflection
Imports System.Diagnostics.Process
PublicClass Form1
PublicSub runapp(ByVal Applicationname AsString)
Try
AppActivate(Applicationname)
Catch ex As Exception
If File.Exists(Applicationname) = TrueThen
Dim startinfo AsNew System.Diagnostics.ProcessStartInfo
startinfo.FileName = Applicationname
System.Diagnostics.Process.Start(startinfo)
Else
MessageBox.Show(Applicationname & " does not exist or is not enabled on this device!")
EndIf
EndTry
EndSub
End
Class
 
It is application :-/ I tried rebuild this project (application) with outuput type "Class Library", but it writes this build error:
COM Interop registration failed. Could not find a type library for assembly 'MapWinInterfaces'.
MapWinInterfaces is interface of map control. I think that it means that it has bad reference. I have tried to repair reference but problem is still the same. Do you have any idea please
 
Back
Top