Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
scripts
hosting
jscript
remote
scripting.wsh
scriptlets
vbscript
virus.discussion
  
 
date: Wed, 28 May 2008 02:27:06 -0700 (PDT),    group: microsoft.public.scripting.hosting        back       


C# vs IActiveScriptSiteWindow   
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.
date: Wed, 28 May 2008 02:27:06 -0700 (PDT)   author:   Xavier

RE: C# vs IActiveScriptSiteWindow   
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.
>
date: Wed, 9 Jul 2008 06:12:00 -0700   author:   Yamhead

RE: C# vs IActiveScriptSiteWindow   
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.
>
date: Sat, 16 Aug 2008 15:23:02 -0700   author:   Eric Eicke

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us