Page 1 of 1

VLC VB6 Active X plugin Issues.

Posted: 06 Feb 2012 20:18
by Umberdark
So after I add it as a component and into the references I can create a VLC plugin. I can add targets using .addtarget, but I can not use the .play function. It does not do anything. There are no errors. My code is as follows:

Code: Select all

Private Sub cmdTest_Click() vlcpTest.addTarget App.Path & "\data.avi", Null, VLCPlayListAppendAndGo, -666 vlcpTest.play End Sub

Additionally in order to use this plugin I had to download an archived version of VLC (0.8.5). If I try to move or resize the plugin VB6 will crash.

Please Help,

Umberdark

Re: VLC VB6 Active X plugin Issues.

Posted: 06 Feb 2012 20:45
by Umberdark
Bump

Re: VLC VB6 Active X plugin Issues.

Posted: 07 Feb 2012 03:29
by RSATom
what about vlc 2.0 nightly?

Re: VLC VB6 Active X plugin Issues.

Posted: 18 Nov 2013 16:14
by Alfie
NEW VB6 TESTED SUGGESTION, NOV 2013...

As of Nov 17 2013, the latest update seemed to break earlier VB6 code (or at least the way I did it stopped working), but the following does work (TESTED! & probably works in VB.Net as well)..

Code: Select all

Dim ax2 As New AXVLC.VLCPlugin2 'In Form header. To load this, goto proj references, '..and load [C:\Program Files\VideoLAN\VLC\axvlc.dll] (or similar) using browse button. '..This will load itself as "VideoLAN VLC ActiveX plugin" Sub whatever() Debug.Print "ax_vlc.object.playing", ax2.VersionInfo ax2.Visible = True 'nb: '..if a video is playing, a window is created/displayed. Warning! No playable video, no window! ax2.Toolbar = True ax2.playlist.Add "file:///" & "C:\SANY0422.MP4" 'my eg (Nb "file:///" is crucial) ax2.playlist.play 'starts Debug.Print "buffering while not .isPlaying", ax2.playlist.isPlaying For n1 = 1 To 20 '2s check to see if found and playing WaitSecs 0.1 'care (ensure no timers interrupt) If ax2.playlist.isPlaying Then GoTo i___________ExitFor Else Debug.Print "buffering while not .isPlaying" End If Next If ax2.video.Width = 0 Then Spot.Msg "FAILED TO LOAD VIDEO", , , vbRed: qPlaySound: GoTo ExitSub i___________ExitFor: 'ok Debug.Print "ax_vlc PLAYING", ax2.video.Width, ax2.video.Height ax2.input.TIME = 0 'sets start position ax2.input.Rate = 1 'set playback speed (1 is normal) For n1 = 1 To 2000 'max vid secs /2 WaitSecs 0.5 ' /2 If ax2.playlist.isPlaying Then Debug.Print "ax_vlc_isPlaying", ax2.input.TIME Else '.isPlaying = False Exit For End If Next Debug.Print "ax_vlc playing complete.", ax2.VersionInfo End Sub Sub WaitSecs(Secs!) 'sample wait proc (tested) Dim tim# Static zGloballyAccessibleTmr# zGloballyAccessibleTmr = Timer tim = zGloballyAccessibleTmr + Secs Debug.Assert Das((tim - zGloballyAccessibleTmr) > Secs + 1) zGloballyAccessibleTmr = Timer Do While tim > zGloballyAccessibleTmr zGloballyAccessibleTmr = Timer If (tim - zGloballyAccessibleTmr) > Secs + 1 Then If InDesign Then Debug.Assert 0 Else Exit Do DoEvents Loop End Sub
Tips: This is surprisingly robust. For example. If you stop VB6 while playing, it will not crash. It is evident from this that you could implement quite a complete video player. I used it simply for frame grabbing. Hope this helps.

Re: VLC VB6 Active X plugin Issues.

Posted: 23 Apr 2023 14:14
by JaimeReynolds
One good idea is download this free software:
DLL Export Viewer:
http://www.nirsoft.net/utils/dll_export_viewer.html

With this software you open any ActiveX, Ocx or Dll or Inclusive Exe's, and show the public properties, events, (methods in some cases I beleive, but I am not sure) of that, is universal...

I don't understand how there is no good source code in different programming languages in this forum, vb6, vb.net, C#, C++, and others...

Re: VLC VB6 Active X plugin Issues.

Posted: 23 Apr 2023 14:23
by JaimeReynolds
For example, the videolan do this (simplified) with DLL Export Viewer:

Code: Select all

DllCanUnloadNow DllGetClassObject DllMain DllRegisterServer DllUnregisterServer DVLCEvents::Click DVLCEvents::DblClick DVLCEvents::KeyDown DVLCEvents::KeyPress DVLCEvents::KeyUp DVLCEvents::MediaPlayerAudioVolume DVLCEvents::MediaPlayerBackward DVLCEvents::MediaPlayerBuffering DVLCEvents::MediaPlayerChapterChanged DVLCEvents::MediaPlayerEncounteredError DVLCEvents::MediaPlayerEndReached DVLCEvents::MediaPlayerForward DVLCEvents::MediaPlayerLengthChanged DVLCEvents::MediaPlayerMediaChanged DVLCEvents::MediaPlayerMuted DVLCEvents::MediaPlayerNothingSpecial DVLCEvents::MediaPlayerOpening DVLCEvents::MediaPlayerPausableChanged DVLCEvents::MediaPlayerPaused DVLCEvents::MediaPlayerPlaying DVLCEvents::MediaPlayerPositionChanged DVLCEvents::MediaPlayerSeekableChanged DVLCEvents::MediaPlayerStopAsyncDone DVLCEvents::MediaPlayerStopped DVLCEvents::MediaPlayerTimeChanged DVLCEvents::MediaPlayerTitleChanged DVLCEvents::MediaPlayerUnmuted DVLCEvents::MediaPlayerVout DVLCEvents::MouseDown DVLCEvents::MouseMove DVLCEvents::MouseUp IVLCAudio::channel IVLCAudio::count IVLCAudio::description IVLCAudio::mute IVLCAudio::toggleMute IVLCAudio::track IVLCAudio::volume IVLCChapter::count IVLCChapter::countForTitle IVLCChapter::description IVLCChapter::next IVLCChapter::prev IVLCChapter::track IVLCControl2::audio IVLCControl2::AutoLoop IVLCControl2::AutoPlay IVLCControl2::BackColor IVLCControl2::BaseURL IVLCControl2::Branding IVLCControl2::FullscreenEnabled IVLCControl2::getVersionInfo IVLCControl2::input IVLCControl2::mediaDescription IVLCControl2::MRL IVLCControl2::playlist IVLCControl2::StartTime IVLCControl2::subtitle IVLCControl2::Toolbar IVLCControl2::VersionInfo IVLCControl2::video IVLCControl2::Visible IVLCControl2::volume IVLCDeinterlace::disable IVLCDeinterlace::enable IVLCInput::chapter IVLCInput::fps IVLCInput::hasVout IVLCInput::length IVLCInput::position IVLCInput::rate IVLCInput::state IVLCInput::time IVLCInput::title IVLCLogo::delay IVLCLogo::disable IVLCLogo::enable IVLCLogo::file IVLCLogo::opacity IVLCLogo::position IVLCLogo::repeat IVLCLogo::x IVLCLogo::y IVLCMarquee::color IVLCMarquee::disable IVLCMarquee::enable IVLCMarquee::opacity IVLCMarquee::position IVLCMarquee::refresh IVLCMarquee::size IVLCMarquee::text IVLCMarquee::timeout IVLCMarquee::x IVLCMarquee::y IVLCMediaDescription::album IVLCMediaDescription::artist IVLCMediaDescription::artworkURL IVLCMediaDescription::copyright IVLCMediaDescription::date IVLCMediaDescription::description IVLCMediaDescription::encodedBy IVLCMediaDescription::genre IVLCMediaDescription::language IVLCMediaDescription::nowPlaying IVLCMediaDescription::publisher IVLCMediaDescription::rating IVLCMediaDescription::setting IVLCMediaDescription::title IVLCMediaDescription::trackID IVLCMediaDescription::trackNumber IVLCMediaDescription::url IVLCPlaylist::add IVLCPlaylist::clear IVLCPlaylist::currentItem IVLCPlaylist::isPlaying IVLCPlaylist::itemCount IVLCPlaylist::items IVLCPlaylist::next IVLCPlaylist::parse IVLCPlaylist::pause IVLCPlaylist::play IVLCPlaylist::playItem IVLCPlaylist::prev IVLCPlaylist::removeItem IVLCPlaylist::stop IVLCPlaylist::stop_async IVLCPlaylist::togglePause IVLCPlaylistItems::clear IVLCPlaylistItems::count IVLCPlaylistItems::remove IVLCSubtitle::count IVLCSubtitle::description IVLCSubtitle::track IVLCTitle::count IVLCTitle::description IVLCTitle::track IVLCVideo::aspectRatio IVLCVideo::count IVLCVideo::crop IVLCVideo::deinterlace IVLCVideo::description IVLCVideo::fullscreen IVLCVideo::height IVLCVideo::logo IVLCVideo::marquee IVLCVideo::scale IVLCVideo::subtitle IVLCVideo::takeSnapshot IVLCVideo::teletext IVLCVideo::toggleFullscreen IVLCVideo::toggleTeletext IVLCVideo::track IVLCVideo::width

Re: VLC VB6 Active X plugin Issues.

Posted: 24 Apr 2023 10:37
by Lotesdelere
Do you realize you are answering to a 10 years old thread ?
And ActiveX is outdated and deprecated, not supported by Microsoft and by recent browsers anymore, and no one should still use ActiveX nowadays.

Re: VLC VB6 Active X plugin Issues.

Posted: 30 May 2023 09:45
by misar
ActiveX is outdated and deprecated, not supported by Microsoft and by recent browsers anymore, and no one should still use ActiveX nowadays.
I totally disagree and this thread is about using the ActiveX in VB, not a browser. It is simple to use compared with LibVLCSharp and has a major advantage. With VB.NET it adds a few Kbytes to your program's build (for a couple of Interop files) whereas LibVLCSharp (or the older VlcDotNet) adds several hundred MBytes for its packages. That is crazy when your program otherwise requires just a few 10s of Mbytes.

By the way, an ancient known bug (https://forum.videolan.org/viewtopic.php?t=109927) appears to have returned in 3.0.18. I had to fall back on 2.2.6 (which I have used for years with VB6). That works perfectly with VB.Net programs built with Visual Studio 22 and running on 64 bit Windows 11.