|
-
May 21st, 2000, 08:07 PM
#1
Thread Starter
Junior Member
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...
-
May 21st, 2000, 08:37 PM
#2
Hyperactive Member
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.
-
May 21st, 2000, 10:05 PM
#3
Thread Starter
Junior Member
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?
-
May 21st, 2000, 10:15 PM
#4
Member
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
-
May 21st, 2000, 10:23 PM
#5
Thread Starter
Junior Member
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?
-
May 21st, 2000, 10:43 PM
#6
Fanatic Member
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. 
{Insert random techno-babble here}
{Insert quote from some long gone mofo here}
-
May 21st, 2000, 11:08 PM
#7
Hyperactive Member
You can also write temporary values to a small table in a database or to the registry.
-
May 22nd, 2000, 12:51 AM
#8
Thread Starter
Junior Member
thanks for all the help... think i'll be working on this for a while...
vb newbie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|