Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 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 September 28th, 2009, 06:53 AM
Friend of Wrox
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts
Question Call another C# Program & pass parameters to bypass startup form

Good day, I need help.

1. I would like to open up another C# program onclick of button.

2. The other program i wantt to call has the same startup form that the one I'm calling from, how do i bypass the startup form of the program i'm calling with right parameter logins.

3. When trying to call the program from a location i get errors on the path: this seems to work "i:\\app\\test" but if i try this then error: "i:\\app\\test i:\\app\\startup.ini 1" - if i run the location then it's fine "i:\app\test i:\app\startup.ini 1"
I get the Error: Cannot find the specified path
string BasePath = Application.StartupPath.ToString();
BasePath =
string ResultingPath = System.IO.Path.Combine(BasePath, "P:\\test\\C#\\WAREH004.exe P:\\test\\C#\\WAREH004.INI 1");

Please Assist! Regards
Old September 29th, 2009, 01:00 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik

Does ur WAREH004.exe app accepts parameters? & does it work properly when u run it itself with ur given parameter?[b]WAREH004.exe P:\\test\\C#\\WAREH004.INI 1" [b]??
Hovik Melkomian.
Old September 29th, 2009, 02:14 AM
Friend of Wrox
Join Date: Jan 2007
Posts: 115
Thanks: 2
Thanked 0 Times in 0 Posts

Hi, I got this working

string root = Application.StartupPath;
string exePath = System.IO.Path.Combine(root, GlobalInfo.exePath); //to Paths defined
string argPath = System.IO.Path.Combine(root, GlobalInfo.argPath);
Process.Start(exePath, argPath + " 1");


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass value to second page (create & pass var) ismailc ASP.NET 2.0 Basics 8 April 24th, 2010 07:03 AM
how to set a form as startup form in vb.net 2.0 mallikalapati .NET Framework 2.0 1 February 21st, 2008 09:19 AM
How to get rid of everything except startup form. biglazy Access 9 March 23rd, 2006 07:33 PM
call to url while keep the form post parameters Goldwind Classic ASP Basics 0 December 25th, 2005 01:21 PM
Form Startup Order NeilS21 Beginning VB 6 2 February 26th, 2004 05:44 AM

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