![]() |
Process.Start()
Hallo!
Wieso funktioniert beim folgenden Code nur dir 1. Möglichkeit? Danke schon mal Grüße Faux
Code:
Process process = [b][color=darkblue]new[/color][/b] Process();
process.StartInfo.FileName = textBox1.Text; process.Start();
Code:
Process process = [b][color=darkblue]new[/color][/b] Process();
process.Start(textBox1.Text); [color=green]//Start ist doch auch mit[/color] [b][color=darkblue]string[/color][/b] fileName [color=green]überladen, oder ist das nicht das Selbe wie StartInfo.FileName?[/color] |
Re: Process.Start()
Warum sollten die nicht gehen? :gruebel:
Code:
Wobei das using hier nicht nötig wäre...
using (Process process = Process.Start("cmd"))
{ } using (Process process = new Process()) { process.StartInfo.FileName = "cmd"; process.Start(); } |
Re: Process.Start()
Wenn ich das 2. Beispiel von mir mache, regt er sich auf, dass kein Pfad definiert ist.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:18 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz