Use VLC With Visual Basic 6

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
elgoomf

Use VLC With Visual Basic 6

Postby elgoomf » 19 Aug 2005 17:09

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

vice-amiral

videolan in vb 6

Postby vice-amiral » 22 Aug 2005 16:18

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

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 22 Aug 2005 16:58

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

matt271
Blank Cone
Blank Cone
Posts: 13
Joined: 03 Mar 2007 09:19

Postby matt271 » 03 Mar 2007 09:22

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.

matt271
Blank Cone
Blank Cone
Posts: 13
Joined: 03 Mar 2007 09:19

Postby matt271 » 03 Mar 2007 11:03

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.

Emerica82
New Cone
New Cone
Posts: 8
Joined: 16 Feb 2007 06:15

Postby Emerica82 » 03 Mar 2007 22:44

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);

matt271
Blank Cone
Blank Cone
Posts: 13
Joined: 03 Mar 2007 09:19

Postby matt271 » 04 Mar 2007 03:21

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.

wrath
Blank Cone
Blank Cone
Posts: 21
Joined: 14 Feb 2007 20:30
Contact:

Postby wrath » 23 Mar 2007 09:17

so you can make some kind of scripts with VB ?

wrath
Blank Cone
Blank Cone
Posts: 21
Joined: 14 Feb 2007 20:30
Contact:

Postby wrath » 24 Mar 2007 09:44

how about any other kind of scripting language like perl of python ?

wrath
Blank Cone
Blank Cone
Posts: 21
Joined: 14 Feb 2007 20:30
Contact:

Postby wrath » 27 Mar 2007 08:27

why isn't anyone answering ?

divx118
Blank Cone
Blank Cone
Posts: 95
Joined: 22 Jun 2006 18:19

Postby divx118 » 27 Mar 2007 17:44

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)

FireW0lf
Blank Cone
Blank Cone
Posts: 27
Joined: 20 Jan 2005 08:01

Postby FireW0lf » 27 Mar 2007 18:06

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

matt271
Blank Cone
Blank Cone
Posts: 13
Joined: 03 Mar 2007 09:19

Postby matt271 » 10 Apr 2007 07:29

what about screen shots?? i cant figure out how to make it take screens of the video.

planethax
Blank Cone
Blank Cone
Posts: 12
Joined: 18 Feb 2008 19:58

Re: Use VLC With Visual Basic 6

Postby planethax » 20 Feb 2008 17:09

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.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 10 guests