-
I just started vb last week editing and finishing 2 existing projects... Now they want me to combine the 2 projects under one larger welcome-screen-type-thingy. How do you call other projects from active project, can you do something like this, project_name.form_name.show, after adding project to project group?
thanks in advance...
-
Or you could make a separate executable out of the app that you want to invoke, and then use the shell command to open it.
-
I would have done that, but I need to pass values from one project to the other... Is there an easy way to do this without rewriting the two projects as one large one?
-
I dont think I am sure on this but what about: Adding the forms, modules from one of the project to the other and compile it.
That is what I use
-
I tried to do that too, but the two projects have forms and modules with same names... i would have to go through one of the programs and rename all the referenced forms and modules... don't want to do that unless it is last option...
Is it a good idea to just break up the programs into class modules that can be shared between the two projects and use one form (welcome screen thingy) that can shell out to either of the two projects?
-
You can send command line arguments when you shell the other exe. For example
In the first project shell your other project
Code:
Call Shell("C:\MyProgram.exe /01")
and anything that comes after the '/' will be passed to the command function when this program is executed and you can retrieve it with something like this:
Code:
Private Sub Form_Load()
dim param
param = Command
if param = "01" then
' do stuff
elseif param = "02" then
' do stuff
else
' do some other stuff
end if
End Sub
Now if you need to send parameters while both programs are running rather than when you just launch an app then you might want to use a file or the registry and have your app check the file or registry using a timer or a doevents loop to continually check and see if the values have been changed. Hope this helps. ;)
-
You can also write temporary values to a small table in a database or to the registry.
-
thanks for all the help... think i'll be working on this for a while...
vb newbie