Page 1 of 1


Posted: 23 Apr 2014 9:15
by hicham
Is it possible to add video or animation to form?

Posted: 24 Apr 2014 7:42
by Kari Rastas
Check VideoLan VLC activeX (open source media player). It should make able to show videos in a VIP program.

Posted: 24 Apr 2014 8:00
by Thomas Linder Puls
Depending on the format of the video/animation you want to play you can use the animationControl.

But you can also use a webBrowserControl; loaded with suitable HTML it will play videos in numerous formats (especially if you download additional codec's).

Posted: 24 Apr 2014 9:42
by hicham
is it possible to give example ?

Posted: 24 Apr 2014 10:16
by Thomas Linder Puls
I have not really tried this code:

Code: Select all

implement videoAnimationForm     inherits formWindow     open core, vpiDomains     clauses     display(Parent) = Form :-         Form = new(Parent),         Form:show().   clauses     new(Parent):-         formWindow::new(Parent),         generatedInitialize(),         animationControl_ctl:path := "animation.avi",         animationControl_ctl:play(),         webBrowserControl_ctl:html :=             "<html>"                 "<head>"                     "<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">"                 "</head>"                 "<body>"                     "<video width=\"320\" height=\"240\" controls>"                         "<source src=\"movie.mp4\" type=\"video/mp4\">"                         "Your browser does not support the video tag."                     "</video>"                 "</body>"             "</html>".   % This code is maintained automatically, do not update it manually. 12:09:24-24.4.2014 facts     ok_ctl : button.     cancel_ctl : button.     help_ctl : button.     animationControl_ctl : animationcontrol.     webBrowserControl_ctl : webbrowsercontrol.   predicates     generatedInitialize : (). clauses     generatedInitialize():-         setFont(vpi::fontCreateByName("Tahoma", 8)),         setText("videoAnimationForm"),         setRect(rct(50,40,383,255)),         setDecoration(titlebar([closebutton,maximizebutton,minimizebutton])),         setBorder(sizeBorder()),         setState([wsf_ClipSiblings,wsf_ClipChildren]),         menuSet(noMenu),         ok_ctl := button::newOk(This),         ok_ctl:setText("&OK"),         ok_ctl:setPosition(76, 194),         ok_ctl:setSize(56, 16),         ok_ctl:defaultHeight := false,         ok_ctl:setAnchors([control::right,control::bottom]),         cancel_ctl := button::newCancel(This),         cancel_ctl:setText("Cancel"),         cancel_ctl:setPosition(140, 194),         cancel_ctl:setSize(56, 16),         cancel_ctl:defaultHeight := false,         cancel_ctl:setAnchors([control::right,control::bottom]),         help_ctl := button::new(This),         help_ctl:setText("&Help"),         help_ctl:setPosition(204, 194),         help_ctl:setSize(56, 16),         help_ctl:defaultHeight := false,         help_ctl:setAnchors([control::right,control::bottom]),         animationControl_ctl := animationcontrol::new(This),         animationControl_ctl:setPosition(8, 6),         animationControl_ctl:setSize(68, 74),         webBrowserControl_ctl := webbrowsercontrol::new(This),         webBrowserControl_ctl:setPosition(84, 6),         webBrowserControl_ctl:setSize(240, 180). % end of automatic code end implement videoAnimationForm
The "IE-Edge" metatag in the HTML is important, otherwise the webBrowser control behaves like in aincient time.

Posted: 24 Apr 2014 10:59
by hicham
i build the project, but i have this error : Undeclared identifier 'path/0'

Posted: 25 Apr 2014 19:20
by Thomas Linder Puls
Which Visual Prolog version do you have?

Posted: 26 Apr 2014 10:53
by hicham