Page 1 of 1

how to change vlc activex control's displayheight and width

Posted: 03 Jul 2006 07:16
by alice
i want to change activex display height and width, i use extentheight but it can't change it .how to change it? please help me ,thanks!

Posted: 28 Jul 2006 11:14
by mzsolt
I'm also creating a web app, where vlc ActiveX plugin is used, and I would like to set the width and height property of ActiveX by javascript but it doesn't work...

Posted: 28 Jul 2006 15:49
by alec_robertson
Try the following for internet explorer/activex:

Code: Select all

<table width="720" height="352" align="center" id="vlct"> <tr><td> <object width="100%" height="100%" id="vlc" classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8"></object> </td></tr> </table> <script language="javascript"> dw = document.body.clientWidth*0.8; // width is 80% of browser dh = dw/720*352; // maintain aspect ratio document.getElementById('vlct').style.height = dh; // set height document.getElementById('vlct').style.width = dw; // set width </script>
The activex will fill the table, and by adjusting the table dimensions you adjust the activex.

Posted: 02 Aug 2006 09:00
by mzsolt
Thanks for the tip. The problem is much more simple than I thought. Just using "vlc.style.width" instead of "vlc.width" resizes the control in IE.

Thanks again for help.

Zsolt