Apire file con programma predefinito in vb6 [santi caltabiano].txt blocco note
1. Apire file con programma predefinito in vb6 [Santi Caltabiano].txt
APRIRE UN FILE CON IL PROGRAMMA PREDEFINITO [VB6]
E' sufficiente utilizzare ShellExecute. Il codice riportato di eseguito apre un
file pdf di nome prova.pdf
posto nella cartella c:aaaa.
--------------------------------------------------------------------------------
-----------------------------
Private 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
Private Sub Command1_Click()
Dim retval As Long
retval = ShellExecute(0, "open", chr(34) & "C:aaaprova.fdf" & chr(34),
vbNullString, vbNullString, vbNormalFocus)
End Sub
--------------------------------------------------------------------------------
-----------------------------
Pagina 1