Results 1 to 8 of 8

Thread: amature... need help with multi projects

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    26

    Unhappy

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

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    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.
    Wade

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    26
    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?

  4. #4

    Talking

    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

  5. #5

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    26

    Question

    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?

  6. #6
    Fanatic Member
    Join Date
    Sep 1999
    Location
    Bethel, North Carolina, USA
    Posts
    987
    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}

  7. #7
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    You can also write temporary values to a small table in a database or to the registry.
    Wade

  8. #8

    Thread Starter
    Junior Member
    Join Date
    May 2000
    Posts
    26

    Talking

    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
  •  



Click Here to Expand Forum to Full Width