Results 1 to 4 of 4

Thread: The 'Media Player' Control

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Posts
    3

    The 'Media Player' Control

    Hello everyone.

    I am creating a projector in VB that can display different types of media: avi, mpg, jpg, gif ..etc. I have chosen the Media Player Control because is supports all of the above formats.

    I need to be able to chop and change between the different files quickly and seamlessly..

    This is the problem: When I change the media file displaying in the control it displays the Windows Media Player logo for a fraction of a second and makes it look really unprofessional..

    I have set the player properties to:
    MediaPlayer1.TransparentAtStart = True

    .. which works for the first run ONLY.

    I have even tried:
    Private Sub MediaPlayer1_OpenStateChange(ByVal OldState As Long, ByVal NewState As Long)
    MediaPlayer1.TransparentAtStart = True
    End Sub


    ..to try and force it when it detects new media.

    I have also tried putting a label or shape over the front of the mediaplayer control but this isn't reliable.

    If any of you chaps/chapesses could help here it really would be appreciated.

    Thanks,

    OpHiuchUs

  2. #2
    Lively Member
    Join Date
    Jun 2002
    Location
    RI
    Posts
    96
    When it goes to the next file try moving it out of site or making its .visible property false for a second.
    I program in: vb6,vb.net,html,c++,java/script

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2002
    Posts
    3
    thankyou luke..

    VB doesnt seem to set the visible property correctly when a video is playing. Moving it is probably the best idea..

    Does anyone know if it is possible to create a media player control at runtime? I have the code for creating a textbox, command button or other built-in control at runtime:

    Dim txtInput
    Set txtInput=frmTest.Controls.Add("VB.TextBox","txtInput",frmTest)

    txtInput.Height=25
    txtInput.Width=50
    txtInput.Visible=True
    etc..

    but I can't get it to work with a media player control (or rather, if it is possible I don't know the correct syntax)

    cheers
    OpH

  4. #4
    Zaei
    Guest
    Check in the Object Browser... Since the Media Player Control is a COM component, it should be creatable by name (like the textbox), but it wont be VB.* . Itll be in some other library.

    Z.

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