Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old September 28th, 2009, 06:53 AM
Friend of Wrox
Join Date: Jan 2007
Location: durban, Africa, South Africa.
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
  #2 (permalink)  
Old September 29th, 2009, 01:00 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik Send a message via Skype™ 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.
  #3 (permalink)  
Old September 29th, 2009, 02:14 AM
Friend of Wrox
Join Date: Jan 2007
Location: durban, Africa, South Africa.
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");


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 08:19 AM
How to get rid of everything except startup form. biglazy Access 9 March 23rd, 2006 06:33 PM
call to url while keep the form post parameters Goldwind Classic ASP Basics 0 December 25th, 2005 12:21 PM
Form Startup Order NeilS21 Beginning VB 6 2 February 26th, 2004 04:44 AM

All times are GMT -4. The time now is 02:42 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.