Access Application from Application

pedders

Member
Joined
May 4, 2007
Messages
6
Programming Experience
Beginner
I have a feeling that the answer is within the realms of fantasy, but without asking i shall never find out.

Picture the scenario.

'Application1' has 'Button1' on 'Form1'

'Application2' starts with Form1 has a data entry form 'FrmNew'

Is it possible to press Button1 in App 1 and have it load App2 at FrmNew rather than the default Form1.

A bit like "C:\App2.exe".FrmNew.show

Regards
TIA

PEdro
 
How exactly would i use that, and with what syntax?

By the way I'm using VB 2005 Express (and Visual Studio 2005).

Thank you

Pedro
 
Last edited:
If you start new process read the command line arguments in forms Load event:
VB.NET:
        For Each s As String In Environment.GetCommandLineArgs
            ' read s command line argument
        Next
Or read e.CommandLine string array in Application.Startup event. For single instance process already running use Application.StartupNextInstance event, it also has e.CommandLine. Refer http://www.vbdotnetforums.com/showthread.php?t=20120
 
Back
Top