Salut,
Il faut enregistrer l'ocx ou la dll sur le système d'accueil.
Ci joint un petit prog
qui permet de le faire
Private Declare Sub SetWindowPos Lib "User32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long)
Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long
Private Sub Form_Load()
SetWindowPos Me.hwnd, -1, (Screen.Width - Me.Width) / Screen.TwipsPerPixelX / 2, (Screen.Height - Me.Height) / Screen.TwipsPerPixelY / 2, Me.Width / Screen.TwipsPerPixelX, Me.Height / Screen.TwipsPerPixelY, 0
End Sub
Private Sub Label2_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
AllonsY Data.Files(1), True
End Sub
Private Sub Label3_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
AllonsY Data.Files(1), False
End Sub
Private Sub picDesenr_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
AllonsY Data.Files(1), False
End Sub
Private Sub picEnr_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
AllonsY Data.Files(1), True
End Sub
Private Sub AllonsY(sFichier As String, bEnreg As Boolean)
Dim sChemin As String
Dim lRet As Long
sChemin = String(256, 0)
lRet = GetShortPathName(sFichier, sChemin, 255)
sFichier = Left(sChemin, lRet)
If bEnreg Then
Shell "regsvr32 " & sFichier, vbNormalFocus
Else
Shell "regsvr32 /u " & sFichier, vbNormalFocus
End If
End Sub
@+