Whats up with Shell....?

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

Please be patient new to C#

Want to use the C# equivilent of VB "Shell" & "Send Keys"
ie:
x=Shell "Path\Notepad.exe"
AppActivate(x)
SendKeys "This is a New TextFile" & "{F3}S"

Tried the Tools.Shell but it says need a ;

If there are no equivilents in C# could someone let me know.
Thanks for any Help
Andrew
 
Hi Andrew,

The VB6 Shell command counterpart in .NET is the System.Diagnostics.Process
class and the ProcessStartupInfo structure.
When you create a ProcessStartupInfo structure to launch a new process, set
the UseShellExecute property to TRUE to get the Shell keyword behavior.

Please refer to MSDN docs on the Process class for more information and
samples.
 
Back
Top