Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old June 11th, 2007, 03:55 PM
Registered User
Join Date: Jun 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do I copy info from 1 program to another?

I'm working on a project where I 'm creating a program to load a program so that the program can be run during intial program.
Program A (Initial) -LOAD-> Program B (MINE) -LOAD-> Program c (3rd party installer)

The issue is the Program C can't be renamed so it can directly work with Program A so I'm basically make a patch to make A & C work togethor. Now I got the Program A to Load Program C, the problem I'm having is that in Program A you enter the serial for Program C it doesn't actually copy over to Program C.

When I ran programs that Program A could directly load externally without Program B, the serial would copy directly to it The problem w/ my patch it won't copy over.

I was hoping someone might know what I need to do to get

Serial Entered In Program A -COPY To MEMORY-> Program B -LOAD-> show in Program C serial box

Please help, I fairly new to visual basic and would aprpeciate any help I could get.


So far the code for my entire project consists of:
Private Sub Form_Load()
RetVal = Shell("NAVSetup.exe", 1)
End Sub

Old June 12th, 2007, 11:58 AM
Friend of Wrox
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

If the value(s) is/are passed as command-line arguments, they will be available in VB as Command$. You can then send that argument to C by creating command-line arguments.
Private Sub Form_Load()

   RetVal = Shell("NAVSetup.exe" & " " & Command$, 1)
   ' Regarding this “1”, you should use the pre-defined constants
   ' (in this case vbNormalFocus that VB has.
   ' This will make your code [u]much</u> easier to understand when you
   ' come back to it in 6 months.


End Sub
There is no reason to catch the return value, since you are never going to use it (having End as the next statement and all).

Remove the RetVal =, and the parenthises around the argument list.
    Shell "NAVSetup.exe" & " " & Command$, vbNormalFocus

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to copy info from formula am6019a VB How-To 1 June 29th, 2006 02:07 PM
Setup Project: Program not added in Start>Program arif_1947 VS.NET 2002/2003 2 March 31st, 2005 06:40 AM
Start a program inside another program Silje Classic ASP Professional 1 November 16th, 2004 02:08 AM
need info vinny Oracle 0 December 28th, 2003 12:04 AM
Where would I get info on how to download info aidanc ASP.NET 1.x and 2.0 Application Design 1 September 29th, 2003 02:45 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.