Page 1 of 1

Use VLC With Visual Basic 6

Posted: 19 Aug 2005 17:09
by elgoomf
Hello,

Is there a way to use VLC in a Visual Basic 6 application?

I heard about activex ...but any example available...any help about this will be nice.

Thank to all

videolan in vb 6

Posted: 22 Aug 2005 16:18
by vice-amiral
Hi, yes you can include videolan in any VB 6 application by using the activex component (available in the last nighty build of videolan 0.8.4).

The problem his that I did not yet manage to make it fully work.

I can insert it in a form and and then i got the white area with the vnc logo.

I'm also able to use some properties and method in the code but I did not succed to work with the addtarget method (one of the first to be used)

Does anybody have an exemple or a documntation on how to use it.

I got a type mistmatch error with most propably the options parameters.
what should I use here (string ?)

If anybody knows, help is welcome

Regards

Posted: 22 Aug 2005 16:58
by Quovodis
the easy way is to try setting the MRL property to the target URL, and set AutoPlay to true in the properties sheet for the control when is you are design mode. the MRL will automatically be played whenever the control is run in user mode.

but for more control, you absolutely need to use addTarget method, whose syntax is

addTarget MRL as String, options As Array of Strings, PlaylistMode as Enumeration, position as Integer

the following example should work
VLCPlugin1.addTarget "http://vthr.videolan.org/~dionoea/vlc-p ... w_h264.asf", Null, VLCPlayListAppendAndGo, -666
options is an optional argument, setting it to Null is usally the right thing to do unless you know what you are doing
-666 means the last entry in playlist, not some demonic incantation

Posted: 03 Mar 2007 09:22
by matt271
Is there anymore details about how to use this control??
Is it created just for VB or is the same control used as the web browser thing?? If so, how could u use properties u set in the web browser, in VB??

I would like to use it to make my own personal version of the windows xp MCE software. VLC does everything i need it to do, play all my videos, play my music, read from my tv tuner, play my DVRMS files, its perfect. i just wish the player itself would respond to my MCE remote, and have some GUI in fullscreen video to change the video.

Posted: 03 Mar 2007 11:03
by matt271
i figured out the gist of it, but how do you apply an option to a playing video? like in VLC u can select a different screen ratio in the menu, and then the video just change to it w/out starting/starting.

Posted: 03 Mar 2007 22:44
by Emerica82
by using the options array which in the example provided is null

VLCPlugin1.addTarget "http://vthr.videolan.org/~dionoea/vlc-p ... w_h264.asf", Null, VLCPlayListAppendAndGo, -666


I can only give a C# example but
string[] options = { ":aspect-ratio=16:10", ":http-caching=5000"};

VLCPlugin1.addTarget ("http://vthr.videolan.org/~dionoea/vlc-p ... w_h264.asf", options, VLCPlayListAppendAndGo, -666);

Posted: 04 Mar 2007 03:21
by matt271
i can give options to it in VB6. i just want to know how to do something like change the screen ratio while the video is still playing

Its like this in VB6:
vlcPlayer.addTarget "J:\Media\TV Shows\Robson Arms\Robson Arms - 2x03 - I Did Not Have **Stay polite ** With That Woman - matt271.wmv", Array("grayscale", "fullscreen", "aspect-ratio=4:3"), VLCPlayListAppendAndGo, -666

this applies those options when it opened the video, i want to change the options during the video. i think it might have something to do w/ the -666 but i have no idea what the -666 does, and when i put dif numbers it just does the same thing.

Posted: 23 Mar 2007 09:17
by wrath
so you can make some kind of scripts with VB ?

Posted: 24 Mar 2007 09:44
by wrath
how about any other kind of scripting language like perl of python ?

Posted: 27 Mar 2007 08:27
by wrath
why isn't anyone answering ?

Posted: 27 Mar 2007 17:44
by divx118
Maybe it's because the questions are not very specific. :)
Yes I think it would be possible to use VB6 but to what level?
What do you want to do?

PS I cannot help you with VB6 because i don't know the language but if you use the search there will be some post about it.
The easiest way is using C# if you know it or VB.net You can use the .dll written by Tappen see here viewtopic.php?t=29789 It has more functionality then the activeX.dll.

Maurice 8)

Posted: 27 Mar 2007 18:06
by FireW0lf
so you can make some kind of scripts with VB ?
VB6 and VBScript are two completely different things unfortunately

I imagine you could use CreateObject within VBS tho - not looked at it tbh

Posted: 10 Apr 2007 07:29
by matt271
what about screen shots?? i cant figure out how to make it take screens of the video.

Re: Use VLC With Visual Basic 6

Posted: 20 Feb 2008 17:09
by planethax
I have been ab le to successfully add and control the activex in vb6,
the issue I have not yet been able to resolve is now packaging and installing the activeX and my app with out installing the VLC Media Player.