Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Short AVI File on Form

Status
Not open for further replies.

efrank

Technical User
Dec 24, 2005
12
US
Is there a way that you can play or "display" a very short AVI Video file on a form? I have a form that I want to illustrate an action for the user, using an AVI file.
I have this file called F1.avi
I've placed an unbound Object Frame and the AVI on my form.
But the AVI doesn't play. It just shows the picture.
What do I need to do to make it play?
Any help would be greatly appreciated.

efrank
 
Have you tried the Windows Media Player control?

Code:
Private Sub Form_Current()
With Me.[i]NameOfMediaPlayerControl[/i]
  .ShowControls = False
  .FileName = Me.[i]NameOfFileNameTextBox[/i]
End With

End Sub

Where file name textbox contains something like:
C:\Data\F1.avi

 
Howdy Remou . . .

Just a quick check.

Shouldn't [blue].FileName[/blue] be [blue].URL[/blue] ?

Could be a version thing . . .

Calvin.gif
See Ya! . . . . . .
 
Hi Aceman, I tested with .Filename and Windows Media Player Control version 6.4.07.1121
 
Roger That Remou . . .

I queried because I've been asked to make a db that specifically presents video in this way. Its for a studio that shoots video of auditions. They want to put the clips on a central network machine where the clips can be voted on and someone selected thereof for that part, or whatever.

The db is currently on hold, in the assessment stage, while I determine which video player ActiveX Control to use. So far I've narrowed it down to [blue]Windows Media Player[/blue] which appears to be the most friendly & easiest to code (along with being the best looking!).

You have alerted me to the fact that I'll need to do some version checking, as their network machines comprise quite a few versions of Media Player (from the old to the new), and I'll need to write code to account for differences in use.

If you wouldn't mind, load the [blue]Windows Media Control[/blue] control in your references, then run the following code from a [blue]module[/blue] in the [blue]modules[/blue] window (prints to the immediate window):
Code:
[blue]Public Sub GetRefList()
   Dim ref As Reference
   
   For Each ref In Application.References
      Debug.Print
      Debug.Print ref.Name
      Debug.Print "Version " & ref.Major & "." & ref.Minor
      If ref.Guid <> "" Then Debug.Print "Guid = "; ref.Guid
      Debug.Print ref.FullPath
   Next
   
End Sub[/blue]
. . . and post back what you get for the Media Player!

For my present state of affairs I get:
Code:
[blue]WMPLib
Version 1.0
Guid = {6BF52A50-394A-11D3-B153-00C04F79FAA6}
C:\WINDOWS\SYSTEM\WMP.DLL[/blue]

BTW . . . [green]congrats on your big promotion! . . . you deserve it![/green]

Calvin.gif
See Ya! . . . . . .
 
I have:
MediaPlayer
Version 1.0
Guid = {22D6F304-B0F6-11D0-94AB-0080C74C7E95}
C:\WIN\SYSTEM\MSDXM.OCX

On a second computer, I have two Windows Media Players listed, both the one you mentioned and the one above. I think this is the reason Access falls apart when I try to add a Media Player control. However, if I copy an mdb that has already been set up, it works fine. It seems that Media Player does not remove previous versions when it is updated.

Thank you [dazed] Have a great new year.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top