Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Controlling Windows Media Player
Message
 
À
16/05/2003 02:54:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00789106
Message ID:
00789819
Vues:
27
>I think the better is to put Windows Media Player ActiveX Control on VFP form - you will have full control over it:
>
>1. From Tools|Options, click on Controls tab and select ActiveX Control. Mark "Windows Media Player".
>
>2. Drop one instance on the VFP form.
>
>3. Drop one command button on the form. Use this code in its Click event to load and play sample file:
>
>ThisForm.Olecontrol1.Open([PathName to media file])
>
>
>Very easy... And you get full right menu and all options! You only need to have necessary drivers, but WMP will also require them.

When I try this, I get an OLE Error - Unknown Name error...

If I change the click of the command button to:
ThisForm.Olecontrol1.OpenPlayer("C:\MyVid.AVI")

it works, but opens a new instance of the media player outside of the VFP form.

All I want to be able to do is show the vid in the form... (The vid filename comes from a table and can be changed by the user by changing the current record.)

Any assistance is appreciated!

Thanks,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform