1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Const SW_SHOW = 1
Const SW_SHOWMAXIMIZED = 3
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
Sub OuvrirAvecApplicationParDefaut(CheminCompletDuFichier As String)
Dim RetVal As Long
On Error Resume Next
RetVal = ShellExecute(0, "open", CheminCompletDuFichier, "", _
"", SW_SHOWMAXIMIZED)
End Sub |
Partager