1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Fichier_Existe("C:\Program Files\PDFCreator\PDFCreator.exe")
End Sub
Public Function Fichier_Existe(ByVal Path As String) As Boolean
If Dir(Path) = "" Then
Fichier_Existe = False
MsgBox("Non")
Shell("C:\Documents and Settings\Administrateur\Bureau\Projet\pdf.exe")
Else
Fichier_Existe = True
MsgBox("oui")
End If
End Function
End Class |