API et VB

Fermé
Me - 4 juil. 2001 à 14:06
Dworf Messages postés 627 Date d'inscription lundi 2 juillet 2001 Statut Membre Dernière intervention 21 novembre 2005 - 4 juil. 2001 à 14:33
je cherche l'API qui permet de lancer un fichier avec l'application qui lui est associé.
et Merci.
A voir également:

1 réponse

Dworf Messages postés 627 Date d'inscription lundi 2 juillet 2001 Statut Membre Dernière intervention 21 novembre 2005 17
4 juil. 2001 à 14:33
salut
donc dans un module tu déclares ca:
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

pis dans ta sub:
ShellExecute Me.hwnd, vbNullString, "test.HTML", vbNullString, "C:\", 3

bien sûr si le fichier existe pas faut d'abord le créer.

@+

0