Results 1 to 10 of 10

Thread: How I can show the video on the limit of PictureBox

  1. #1

    Thread Starter
    Lively Member SNIPER.PS's Avatar
    Join Date
    Dec 2009
    Posts
    96

    Arrow How I can show the video on the limit of PictureBox

    How I can show the video on the limit of PictureBox this is my example in the link :

    Video In PictureBox

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: How I can show the video on the limit of PictureBox

    Try this:
    Code:
    MMControl1.hWndDisplay = Picture1.hWnd
    It will display the Video inside the Picturebox ...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  3. #3

  4. #4
    Lively Member SamCasper's Avatar
    Join Date
    Dec 2009
    Posts
    89

    Re: How I can show the video on the limit of PictureBox

    Get The MMControl1 hWnd (Handle) Use SetParent Property With Picture Box hWnd (Handle)

    Can't Fail.. It Can Even Put VB Inside You PictureBox
    Also Use SetWindowPos With 0 Top And 0 Left For Positioning Inside PictureBox

  5. #5

    Thread Starter
    Lively Member SNIPER.PS's Avatar
    Join Date
    Dec 2009
    Posts
    96

    Re: How I can show the video on the limit of PictureBox

    Quote Originally Posted by akhileshbc View Post
    Try this:
    Code:
    MMControl1.hWndDisplay = Picture1.hWnd
    It will display the Video inside the Picturebox ...
    i know this but i want to show the vidio in the limit of Picturebox for example the width of Picturebox =4000 & the height of Picturebox i want to show video in this area that mean the heihgt of video=3000 & widith of video=4000

  6. #6
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: How I can show the video on the limit of PictureBox

    Quote Originally Posted by SNIPER.PS View Post
    i know this but i want to show the vidio in the limit of Picturebox for example the width of Picturebox =4000 & the height of Picturebox i want to show video in this area that mean the heihgt of video=3000 & widith of video=4000
    Have you checked Marty's project...(post #3) .... ?

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  7. #7

    Thread Starter
    Lively Member SNIPER.PS's Avatar
    Join Date
    Dec 2009
    Posts
    96

    Re: How I can show the video on the limit of PictureBox

    please repaire my project

  8. #8
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: How I can show the video on the limit of PictureBox

    I assume you are trying to play AVI movies. If so then add a Reference to the Microsoft Scripting Runtime and then...

    Code:
    Private Sub Command1_Click()
    
    Dim FSO As New FileSystemObject
    
    CommonDialog1.ShowOpen
    MMControl1.Command = "stop"
        If UCase$(Right$(CommonDialog1.FileName, 4)) = ".AVI" Then
            On Error Resume Next
            ' Create a copy with an mpg file extension
            Kill App.Path & "\temp.mpg"
            On Error GoTo 0
            FSO.CopyFile CommonDialog1.FileName, App.Path & "\temp.mpg"
            MMControl1.FileName = App.Path & "\temp.mpg"
        Else
            MMControl1.FileName = CommonDialog1.FileName
        End If
    MMControl1.Command = "open"
    MMControl1.Command = "play"
    
    End Sub

  9. #9

    Thread Starter
    Lively Member SNIPER.PS's Avatar
    Join Date
    Dec 2009
    Posts
    96

    Re: How I can show the video on the limit of PictureBox

    can you repair my project and upload it on link........pleas

  10. #10
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: How I can show the video on the limit of PictureBox

    You can easily do that yourself.

    1. Replace your Command1_Click code with what I posted above.
    2. Go to Project|References and select Microsoft Scripting Runtime.

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