Hello! I try to use ActiveScript in C# code. Help me please with such problem. I implement IActiveScriptSiteWindow interface, but the support of using the MsgBox in script doesn't work. The error raise while executing the script on line with MsgBox code. What am I doing wrong? Here is the example of the interface IActiveScriptSiteWindow: [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid(@"D10F6761-83E9-11CF-8F20-00805F2CD064")] public interface IActiveScriptSiteWindow { void GetWindow(out IntPtr phwnd); void EnableModeless(bool fEnable); } I my class I inherit this interface too. All works excapt this functionality. Thanx in advance.
What was the error? Have you considered changing the MsgBox call to MessageBox.Show()? "Xavier" wrote: > Hello! > > I try to use ActiveScript in C# code. > > Help me please with such problem. I implement IActiveScriptSiteWindow > interface, but the support of using the MsgBox in script doesn't work. > The error raise while executing the script on line with MsgBox code. > What am I doing wrong? > > Here is the example of the interface IActiveScriptSiteWindow: > > [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), > Guid(@"D10F6761-83E9-11CF-8F20-00805F2CD064")] > public interface IActiveScriptSiteWindow > { > void GetWindow(out IntPtr phwnd); > void EnableModeless(bool fEnable); > } > > I my class I inherit this interface too. All works excapt this > functionality. > > Thanx in advance. >
Add [ComVisible(true)] to your COM interfaces. "Xavier" wrote: > Hello! > > I try to use ActiveScript in C# code. > > Help me please with such problem. I implement IActiveScriptSiteWindow > interface, but the support of using the MsgBox in script doesn't work. > The error raise while executing the script on line with MsgBox code. > What am I doing wrong? > > Here is the example of the interface IActiveScriptSiteWindow: > > [InterfaceType(ComInterfaceType.InterfaceIsIUnknown), > Guid(@"D10F6761-83E9-11CF-8F20-00805F2CD064")] > public interface IActiveScriptSiteWindow > { > void GetWindow(out IntPtr phwnd); > void EnableModeless(bool fEnable); > } > > I my class I inherit this interface too. All works excapt this > functionality. > > Thanx in advance. >