WindowsMediaPlayer Control

prn6243

New member
Local time
Today, 20:25
Joined
Jun 13, 2021
Messages
6
I have a WMP control on a form.
A command box runs the player which shows a video based on the contents of a field on the form

I have set the WMP control property to run full screen.

However, the first time i run the command it is full screen but if I run it again it reverts to minimised.

If I close & re-open the form the same thing happens- full screen at first then minimised.

Anyone any idea how I can make all videos play full screen?
 
ActiveX controls can act erratic in Access. Quite possibly the full screen feature is not really possible with any consistency within Access. I can't even get the minimal success you experience. I even have to press the play button twice for the first time playing after form is opened. If you want to provide your db for analysis, follow instructions at bottom of my post.
 
ActiveX controls can act erratic in Access. Quite possibly the full screen feature is not really possible with any consistency within Access. I can't even get the minimal success you experience. I even have to press the play button twice for the first time playing after form is opened. If you want to provide your db for analysis, follow instructions at bottom of my post.
Thank you very much for your reply.
On opening the form containing the WMP activex control when I click to play a video withthe filename based on the contents of another field on the form, it runs fullscreen. If I then choose another item from the field it runs the video minimalised.
If I close the form & reopen it the same thing happens, First video is fullscreen after that minimalised.
Is there a way of telling Access to close the form and re-open it in vba?
 
Yes.

DoCmd.Close
DoCmd.OpenForm "formname"
 
From design view, double click on WMP control to open a special properties dialog.
 
Thanks for the replies.
ISAAC- I have found 2 areas where the fullscreen property can be set. The method suggested by JUNE 7 above and if you click on the WMP control, the properties window under the "ALL" tab has "fullscreem" near the bottom of the list. I have set this to "YES".
AS I have said, it does run full screen on the first click but reverts to minimalised after that. It plays minimalised but the 2 settings still show as fullscreen.. Here is the code for the CLICK event-

Private Sub Text23_Click()

WindowsMediaPlayer9.URL = "C:\SHEDS\" & SHED & ".mp4" (location of video)

End Sub

If I close the form containing the WMP control and re-open it plays full screen at first again. So I added a do.cmd.Close entry after the line which plays the video thinking it would play then close the form. Unfortunately, it just closed the form-did not play the video.
I have spent hours trying to resolve this and am beginning to think it is a quirk within access.
Hopefully, someone here may have a solution.
 
Thx to those who took an interest in my problem

I think there is a glitch in Access stopping me showing full screen videos

I have installed the VLC Media Player ActiveX Plugin, and, to cut a long story short, all is working well.
It is much easier to manipulate than WMP. To get to full screen I just click on the icon on the toolbar (player control bar) but I am sure I will find a way of getting there by VBA.
 
I downloaded VLC and a folder full of dll's for Access came with it. Which file did you use?
 
I downloaded VLC and a folder full of dll's for Access came with it. Which file did you use?
It is axvlc.dll. If you install VLC it is in the VLC folder with the exe file.
You must add it to Access thro Object Browser, Tools, References. then brows to the file.
It took me no time at all to find how to show videos full screen thro VBA so now my project is complete.
 
I have the library now. Should I see a control in the ActiveX list? Do you want to post your code? This might be a nice addition to Sample Databases forum if you want to put one together and post it.
 
Yes you should see Videolan VLC ActiveX Plugin n the list. If it isn't there open Object Browser -Tools-References and when the list of controls appears click on Browse and point to the axvlc.dll file.
The code for choosing a video from a field on the form and playing it in VLC in full screen is in the attached file-CODE.TXT

My database is 382mb so too big to send.
 

Attachments

I already navigated to the dll and added. I can see the library elements in VBE. However, I do not see any control with VLC in name in ActiveX controls on Design tab. I followed steps outlined in https://stackoverflow.com/questions/32003530/vlc-playing-embedded-in-ms-access-2013 and additional steps in https://stackoverflow.com/questions...nstall-vlc-activex-plugin-in-microsoft-access but the control never shows in ActiveX list.

Yes, posting a sample database would mean building one specifically for the technique to be demonstrated, not your major application.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom