Results 1 to 8 of 8

Thread: How to Make a Video Playing in a Picture Box to view as Full Screen...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    India, Chennai
    Posts
    121

    Unhappy How to Make a Video Playing in a Picture Box to view as Full Screen...

    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 so that I can see the Window in full screen. If any one have a idea Please help me.
    Thank you.

  2. #2
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    Try this:

    Code:
        Picture1.With = Me.ScaleWidth
        Picture1.Height = Me.ScaleHeight
        
        Me.BorderStyle = 0
        Me.WindowState = 2
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    India, Chennai
    Posts
    121

    That's not working...

    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.

  4. #4
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    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):

    Code:
    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
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    India, Chennai
    Posts
    121

    It's Working But the Video Flashes and becomes Invisible...

    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,

  6. #6
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    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 for playing AVI's on Form's or PictureBoxes, I think that's where I got the code once...
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Dec 2000
    Location
    India, Chennai
    Posts
    121

    I can't understand what u Say...?

    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....

  8. #8
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    Mhhh....doesn't make much sense to me either


    Anyways, forget that part and search on PlanetSourceCode for the solution, I'm sure it's there...
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width