Events in single threaded ActiveX control in my HTML file are not recognized

Events in single threaded ActiveX control in my HTML file are not recognized

Post by Thomas A. Row » Fri, 18 May 2001 04:53:30



What has this to do with FrontPage, try the IE newsgroup.

--

=====================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, Email Discussion List,
Newsletter, WebRing, MS KB Quick Links, etc.



Quote:> I have a problem in 2 machines (one machine uses IE 4.72 and the other
uses
> IE 5.00.2919.6307) where it does NOT recognize any event I have in any
> ActiveX controls created using "Single Threaded" Threading Model. It does,
> however,  recognize events on any ActiveX controls created using
"Apartment
> Threaded" Threading Model. I can fix the problem in IE 4.72 by checking
the
> "Browse in a new process" checkbox in Internet Options - Advanced tab, but
> that checkbox  is NOT available in IE 5 browser
> (http://support.microsoft.com/support/kb/articles/Q240/9/28.ASP). It says
> that in IE 5 it is automatically enabled or disabled based on the amount
of
> RAM on the computer. If the computer has 32 MG or more RAM, the setting is
> enabled. The computer with IE 5.00.2919.6307 has 64 MG of RAM. The problem
> does not happen in other IE 5.00.2919.6307 machine, only in 1 machine we
> have this problem. How can I fix the problem so that it can recognize
events
> of the ActiveX controls? Thank you very much.

> On the sample code below, I use a very simple Visual Basic 6.0 ActiveX
> control with 1 command button with RaiseEvent Click in the Command1_Click
> event.

> The code in the ActiveX control is:
> Public Event Click()
> Private Sub Command1_Click()
>     RaiseEvent Click
> End Sub

> The code in the HTM file is:
> <object classid="clsid:79C55724-42FE-11D5-B966-00AA00C7B747" id="ffa2"
> width="320" height="240"
> codebase="ffa2.cab#version=1,1,0,0">
> </object>
>  <SCRIPT LANGUAGE="JavaScript" FOR="ffa2" EVENT="Click()">
>   alert("click")
>  </script>
> Using IE 4.72, if I uncheck the "Browse in a new process" checkbox in
> Internet Options - Advanced tab, when I click on the command button, the
> message box "click" does not show up. If I check the "Browse in a new
> process" checkbox, when I click on the command button, the message box
> "click" shows up. I have another ActiveX control with the same code as
> above, but I compile using "Apartment Threaded" Threading Model, using IE
> 4.72 either I check or uncheck the "Browse in a new process" checkbox, the
> message box "click" shows up.

> Using IE 5.00.2919.6307, when I click on the command button, the message
box
> "click" does not show up (even though we have other computer with IE
> 5.00.2919.6307 that the message box "click" shows up).