Video
Posted: 23 Apr 2014 9:15
Is it possible to add video or animation to form?
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