Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Javascript ActiveX , +
I am using an activeX control which i have created using c#, in an html page. This activeX works fine when we do not mouse over the image button which has src change inline javascript attached to it.When we do mouse over the image butoon it is causing this activeX to flicker by sending resize and repaint on this control.
I have handled doubled buffered and optimised double property on the control.But none of them seem to stop flicker.
 
Is there anyone who has any idea on this issue? The html code looks like this:
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
 

<head>
    <title></title>
</head>
 <body>
 <div class="ActiveXContainerCls" id="VideoHolder" style="border: 2px solid #808080;height: 500px; width: 500px" />
        <script type="text/javascript">
            var obj;
            try {
             var activeXHolder = document.getElementById("VideoHolder");
             objectId = "test";
             var CLSIDOBJ = "clsid:0991EA56-C93E-4D30-ACC7-13CC0E4F1B5B";
             activeXHolder.innerHTML = "<object Id = '" + objectId + "' classid='" + CLSIDOBJ + "'height=" + "100% width=" + "100% />";
             obj = document.getElementById(objectId);
 
                if (obj) {                
 
                  obj.Initialise();
                  obj.ShowVideo();
                } else {
                    alert("Object is not created!");
                }
            }
            catch (ex) {
 
                alert("Some error happens, error message is: " + ex.message);
            }
 
            function Button1_onclick() {
 
                obj = document.DemoActiveX;       
            if (obj) {
                alert("button click");
             }
            }
 
        </script>
 <input type="image" src="VCButtonImages/record-normal.png" id="record" class="btnRecordCls"
                                                                                    alt="Record" title="Record" onmouseover="javascript:this.src='VCButtonImages/record-hover.png'"
                                                                                     önmouseout="javascript:this.src='VCButtonImages/record-normal.png'" />
       <input id="Button1" type="button" value="Pan" onmousemove="javascript:return false;" onmouseout="javascript:return false"  önclick="return Button1_onclick()" />
   </body>
</html>
Posted 27-Dec-12 22:19pm
Edited 27-Dec-12 22:57pm
(no name)499K
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 George Jonsson 215
1 Kornfeld Eliyahu Peter 169
2 Zoltán Zörgő 139
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,342


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 28 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100