Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/12/2007, 15:59
Avatar de RsOfT
RsOfT
 
Fecha de Ingreso: marzo-2002
Ubicación: InterNET
Mensajes: 1.121
Antigüedad: 22 años, 2 meses
Puntos: 7
Abrir un PDF desde VB.NET 2005 (Windows Aplication)

¿Cómo puedo abrir un PDF desde VB.NET 2005?

Anteriormente en VB6 yo declaraba el siguiente API:
Código:
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Y para Abrir el PDF ejecutaba el siguiente código:
Código:
ShellExecute(0, vbNullString, "c:\Archivo.PDF", vbNullString, vbNullString, vbNormalFocus)
Pero esto en .NET no me funciona, sino que me da el siguiente error:
Cita:
A call to PInvoke function 'LecturaLog!LecturaLog.frmPrincipal::ShellExecute' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
¿Que puedo hacer para abrir un PDF desde VB.NET 2005?
__________________
.::RsOfT::.
--El que se aferra a lo conocido, nunca conocerá lo desconocido--
--Es intentando lo imposible como se realiza lo posible--
--Es de pésimo gusto contentarse con algo mediocre cuando lo excelente está a nuestro alcance--