Click to See Complete Forum and Search --> : How to Make a Video Playing in a Picture Box to view as Full Screen...
lvramanan
May 17th, 2001, 10:59 PM
Hi Everybody,
I've designed a media Player with the Microsoft Multimedia Control. I've put a Picture box and assigned the hwnd with the hwnd of the MMcontrol. (picture1.hwnd=mmcontrol1.hwnddisplay) Now What should I make :confused: so that I can see the Window in full screen. If any one have a idea Please help me.
Thank you.;)
CyberCarsten
May 18th, 2001, 12:34 PM
Try this:
Picture1.With = Me.ScaleWidth
Picture1.Height = Me.ScaleHeight
Me.BorderStyle = 0
Me.WindowState = 2
lvramanan
May 18th, 2001, 08:11 PM
Hi Cybercarsten,
I tried your idea. Only the Picture box is getting maximized and the video init is not getting maximized. Any other Idea. Please help me. Anyway thank you for ur suggestion.
Regards,
Ramanan.
PsychoMark
May 20th, 2001, 11:20 AM
This doesn't use a picturebox or the multimedia control, but it does work (should work for other types than AVI too, but haven't tested it):
Private Declare Function mciSendString Lib "winmm.dll" Alias "mciSendStringA" _
(ByVal lpstrCommand As String, ByVal lpstrReturnString As String, _
ByVal uReturnLength As Long, ByVal hwndCallback As Long) As Long
Public Function PlayAVI(sFileName As String, bFullScreen As Boolean)
Dim sCommand As String
If bFullScreen Then
sCommand = "play " & sFileName & " fullscreen"
Else
sCommand = "play " & sFileName
End If
Call mciSendString(sCommand, 0&, 0, 0&)
End Function
lvramanan
May 21st, 2001, 12:47 AM
Hi Psychomark,
Your example worked but the Video Flashed for a Moment and became Invisible. I tried AVI and Video Cd Files. Both have the Same Result. In my example I can see the Movie in a Picture Box. Is it posssible to specify a Destination here... Please help me. Anyway thanks for ur help.
Regards,
:p
PsychoMark
May 21st, 2001, 01:36 AM
I'm sure there's a way to specify a destination in the command string, but I don't really know how at the moment (I think I saw it once though)...
But what would be the point in it? You would have to maximize the form anyways. About the flashes, the only ones I got was between two movies, so I just put a black maximized form behind it :)
Search at PlanetSourceCode (http://www.planetsourcecode.com/vb/) for playing AVI's on Form's or PictureBoxes, I think that's where I got the code once...
lvramanan
May 21st, 2001, 02:03 AM
Hi Psycho,
I can't understand what u r doing according to which what you've told below...
But what would be the point in it? You would have to maximize the form anyways. About the flashes, the only ones I got was between two movies, so I just put a black maximized form behind it
Can u Please explain it....
PsychoMark
May 21st, 2001, 02:05 AM
Mhhh....doesn't make much sense to me either :D
Anyways, forget that part and search on PlanetSourceCode for the solution, I'm sure it's there...
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.