I'm looking for a program reproduces in a picture box the AVI files present within the various files (of course continuous playback and transparent effect including). dll and others, I found one in Visual Basic and it works, but I can not do it Running in VB 10, i have also searched in interenet for several days but without result, do you have a solution?
pablo71@tiscali.it for answers... thank!!!!

Dani AI

Generated

Practical approach that works reliably in VB 2010 (Visual Basic .NET): embed the AVI inside the DLL as a managed resource, extract it at runtime to a temporary file, and point an embedded player (Windows Media Player ActiveX or VLC ActiveX) at that temp file. is correct to suggest WMP/VLC as players; is also right that this can be a small project rather than a one-line fix. The code below shows the common, robust pattern for extraction + playback and enables continuous looping.

' extract embedded AVI and play with Windows Media Player ActiveX
Dim asm As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
Using rs As System.IO.Stream = asm.GetManifestResourceStream("MyNamespace.MyVideo.avi")
    Dim temp As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), Guid.NewGuid().ToString() & ".avi")
    Using fs As New System.IO.FileStream(temp, System.IO.FileMode.Create, System.IO.FileAccess.Write)
        rs.CopyTo(fs)
    End Using
    AxWindowsMediaPlayer1.settings.setMode("loop", True)
    AxWindowsMediaPlayer1.URL = temp
End Using

Notes on transparency and continuous playback: ActiveX players are windowed controls and do not natively composite with WinForms for true per-pixel transparency. To get a genuine transparent overlay, consider one of these paths: host a WPF MediaElement (ElementHost) so the compositor can blend visuals; use DirectShow with VMR9/EVR mixing (requires DirectShow.NET or unmanaged code) to render with alpha; or use libVLC frame callbacks to draw frames into a bitmap and do manual alpha compositing. Those options are more advanced but provide the "transparent effect" that a plain WinForms ActiveX cannot.

Troubleshooting tips: target the correct process bitness (many codecs/ActiveX are 32-bit, so set project to x86 if needed), use unique temp filenames and remove them on exit, confirm required codecs are installed, and handle exceptions around resource access. For true in-memory playback without temp files, a custom DirectShow source filter or native callbacks is required.

Recommended Answers

All 2 Replies

This sounds like other than a programming question. That is, you are seeking a solution rather than help in coding.

Maybe this should be turned into a RFQ (request for quote) or something you put out for hire?

There is an example of embedding Windows Media Player in a vb form here. I have also embedded a vlc media player control in another project if you are interested.

commented: Quiet on the set, roll! +15
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.