-
August 31st, 2006, 05:34 PM
#1
how to start games
ok i have a trouble here, when i try to start a game with
System.Diagnostics.Process.Start(@"path");
the game cant axcess its own files, is says like couldnt find the file ect BUT the files are there
how do i start a game with c# that uses other files??
-
September 1st, 2006, 01:01 AM
#2
Re: how to start games
Post some code from your game and post the exceptions you get .
-
September 1st, 2006, 02:08 AM
#3
Re: how to start games
When you make this call
System.Diagnostics.Process.Start(@"path");
what is the current working directory?
-
September 1st, 2006, 06:13 AM
#4
-
September 1st, 2006, 11:31 AM
#5
Re: how to start games
What I mean is that the process you are starting will use the parent process working directory unless you specifically specify it and if the program starting the process is not in the same directory as the program to be started it will not find any of its files.
You need to use the StartInfo Class to specify a working directory and program
Code:
ProcessStartInfo ProgInfo = new ProcessStartInfo(FilePath);
Prog.WorkingDirectory = WorkingDir;
Process prog = new Process(ProgInfo);
-
September 2nd, 2006, 01:58 PM
#6
Re: how to start games
thanks now it working perfect
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|