Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: MsgBox and InputBox error in VBScript

0
0
Hi Jesper,

For these functions to work, you must provide an implementation of Microsoft.ClearScript.Windows.IHostWindow. Here's a minimal example:
internalclass HostWindow : IHostWindow {
    public IntPtr OwnerHandle {
        get { return IntPtr.Zero; }
    }
    publicvoid EnableModeless(bool enable) {
        thrownew NotImplementedException();
    }
}
And then:
engine.HostWindow = new HostWindow();
engine.Execute("result = MsgBox(\"Ready?\", vbQuestion + vbYesNo, \"Let's Go!\")");
You can download ClearScript's API reference here.

Good luck!

Viewing all articles
Browse latest Browse all 2297