Si vas a copiar

.. y pegar este post en tu web o blog personal, por favor te pido que coloques el link del post de donde lo copiastes:

Fuente:

Iniciar un programa en C# y VB.NET

19 de abril de 2011 No hay comentarios.:
C#


using System;
using System.Diagnostics;
using System.ComponentModel;

namespace MyProcessSample
{
class MyProcess
{
public static void Main()
{
Process myProcess = new Process();

try
{
myProcess.StartInfo.UseShellExecute = false;
myProcess.StartInfo.FileName = "C:\\ejecutable.exe";
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();

}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
}
}





VB.NET


Imports System
Imports System.Diagnostics
Imports System.ComponentModel


Namespace MyProcessSample

Class MyProcess

Public Shared Sub Main()
Dim myProcess As New Process()

Try

myProcess.StartInfo.UseShellExecute = False
myProcess.StartInfo.FileName = "C:\\ejecutable.exe"
myProcess.StartInfo.CreateNoWindow = True
myProcess.Start()

Catch e As Exception
Console.WriteLine((e.Message))
End Try
End Sub
End Class
End Namespace




Publicado en tttony.blogspot.com

Buscar en el Blog



PUBLICIDAD