ray76
Nouveau membre
Bonsoir a toutes et tous, forum bonsoir
(1) Je souhaiterai svp positionner a l'écran windows média player dès l'ouverture a un endroit de mon choix, car je voudrai qu'il s'ouvre toujours au mème endroit question de présentation sur ma page
(2) et un petit code pour arreter et effacer une image dans une forme
PS: sous seven 32 bits
Merci a vous et de votre temps combien précieux
Bonne soirée et merci d'avance
Raymond
[cpp]Option Explicit
'*** LANCE UN FILM SUR DOUBLE CLIC DANS LA LISTE COLONNE A
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim Chemin As String: Dim Fichier As String: Dim Shp As Shape
'===============
Dim s As Shape
'===============
If Not Intersect(Target, Range("A4:A" & [A1800].End(xlUp).Row)) Is Nothing Then
'===========================================
For Each s In ActiveSheet.Shapes
If s.Type = msoPicture Then s.Delete
Next s
'===========================================
Cancel = True
Chemin = "E:\Videos\"
Fichier = "E:\Affiche\" & Target.Value & ".jpg"
End If
'*** APPEL DU FILM CHOISI DANS LA COLONNE A
Shell """C:\Program Files\Windows Media Player\wmplayer.exe"" """ & Chemin & Target & ".avi", vbMaximizedFocus
'*** APPEL DE L'IMAGE CORRESPONDANT AU FILM (A) (B) (C) (D)
Set Shp = Feuil1.Shapes.AddPicture(Fichier, msoFalse, msoCTrue, 900, 50, 200, 240)
End Sub[/cpp]
(1) Je souhaiterai svp positionner a l'écran windows média player dès l'ouverture a un endroit de mon choix, car je voudrai qu'il s'ouvre toujours au mème endroit question de présentation sur ma page
(2) et un petit code pour arreter et effacer une image dans une forme
PS: sous seven 32 bits
Merci a vous et de votre temps combien précieux
Bonne soirée et merci d'avance
Raymond
[cpp]Option Explicit
'*** LANCE UN FILM SUR DOUBLE CLIC DANS LA LISTE COLONNE A
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim Chemin As String: Dim Fichier As String: Dim Shp As Shape
'===============
Dim s As Shape
'===============
If Not Intersect(Target, Range("A4:A" & [A1800].End(xlUp).Row)) Is Nothing Then
'===========================================
For Each s In ActiveSheet.Shapes
If s.Type = msoPicture Then s.Delete
Next s
'===========================================
Cancel = True
Chemin = "E:\Videos\"
Fichier = "E:\Affiche\" & Target.Value & ".jpg"
End If
'*** APPEL DU FILM CHOISI DANS LA COLONNE A
Shell """C:\Program Files\Windows Media Player\wmplayer.exe"" """ & Chemin & Target & ".avi", vbMaximizedFocus
'*** APPEL DE L'IMAGE CORRESPONDANT AU FILM (A) (B) (C) (D)
Set Shp = Feuil1.Shapes.AddPicture(Fichier, msoFalse, msoCTrue, 900, 50, 200, 240)
End Sub[/cpp]