On Oct 1, 11:34 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
h...@gmx.at> wrote:
> On Oct 1, 11:34 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
>
[quoted text clipped - 19 lines]
>
> Is there a shorter way?
Shorter way? Why the heck does that matter?
Anyways, you could do it in one giant, sloppy (imo), line:
Process.Run(Path.Combine(Application.StartupPath, "foo.exe"))
However, in my opinion being verbose is much better than trying to
make a "short" program. When you go to in to perform maintenance on
your code it is much more difficult to work with compact code.
Thanks,
Seth Rowe
kimiraikkonen - 03 Oct 2007 10:57 GMT
> > On Oct 1, 11:34 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
>
[quoted text clipped - 35 lines]
>
> - Show quoted text -
Seth,
I understood and i agree that i don't like short coding but i want a
well-organized and well-understandable codings. That's why i asked the
shorter way meaning if there are alternative coding methods for
specifying root folder.
However look at this, there 2 problems:
1-I cannot hide my "foo.exe" while it's processing until it finishes,
it still present on the screen,
2-Between which lines should i put appstartup path for running
everyfolder where my project is installed?
Dim myProcess As System.Diagnostics.Process = New
System.Diagnostics.Process()
myProcess.StartInfo.WindowStyle =
System.Diagnostics.ProcessWindowStyle.Hidden
myProcess = System.Diagnostics.Process.Start("c:
\foo.exe")
myProcess.WaitForExit()
MsgBox(" Completed Successfully", MsgBoxStyle.Information,
"Completed")
You could create a sub or function that take the exe file as an argument if
you need to use this several times for different exe files (read the
language specification at least once if needed)...
---
Patrice
> On Oct 1, 11:34 pm, "Herfried K. Wagner [MVP]" <hirf-spam-me-
> h...@gmx.at> wrote:
[quoted text clipped - 18 lines]
>
> Is there a shorter way?