????? ??????? Visual C# ??????? ???? VBScript ??? ???? ??? ???? ?? ?????? ?? ???? ???? ActiveX WebBrowser ?? ??? ??????? Windows ???????

?????? ????????? ?????? ?????????
???? ???????: 922275 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

????? ???

???? ??? ??????? ????? ??????? Microsoft Visual C# ??????? ???? Microsoft Visual Basic Scripting Edition (VBScript) ??? ???? ???. ???? ??? ??????? ??? ????? ???? ??? ?? ???? ???? ActiveX WebBrowser ?? ????? ????? Windows.

?????? ????????? ?? ????? "???? ?? ?????????" ??? ?? ???? ???? ?????? ??????? ???????:
  • ????? ????? Visual C# ?? Windows ????? ??? ???? ???? ActiveX WebBrowser.

    ????? ?? ????????? ??? ????? ????? ???? ???? ActiveX ??? ????? ????? Windows ?? ?????? ???? ???? ????? Microsoft (MSDN) ?????? ??? ?????:
    http://msdn2.microsoft.com/en-us/library/1w560tdz.aspx
  • ???? ??? ????? ??? ?????? VBScript ???? ??? ?????.

    ????? ?? ????????? ??? VBScript ?? ?????? ???? MSDN ??????:
    http://msdn2.microsoft.com/en-us/library/t0aew7h6.aspx
?????? ??? ????? ????????? ???????? ?? ??? ??????? ??? ????????? ????? Windows ???? ????? ??? ???? ???? ActiveX WebBrowser ???. ??? ??? ?????? ???? ???? WebBrowser ????? Windows ???? ??? ??????? ?? ??????? ????? ??, ??? ????? ????????? ???????? ?? ??? ???????. ????? ?? ????????? ??? ???? ?????? WebBrowser ????? Windows ?? ?????? ???? MSDN ??????:
http://msdn2.microsoft.com/en-us/library/2te2y1x6.aspx

??????? ????

???? ????????? ??????? ????? ??????? ???? VBScript ??? ???? ??? ???? ?? ?????? ?? ???? ???? ActiveX WebBrowser.

????? ???? ??? ????? ?????? Microsoft HTML (Mshtml.tlb)

??? ??????? ???? VBScript ?? ???? ???? ActiveX WebBrowser ?? ????? ????? Windows ? ??? ????? ???? ??? ????? ?????? Microsoft HTML. ?????? ????? ???? ??????? ???????:
  1. ??? ????? Microsoft Visual Studio .NET ?? Microsoft Visual Studio 2005.
  2. ?? ??????? ???? ??? ??? ??? ?? ???? ??? ???????.

    ?????? ?? Visual Studio 2005 ? ???? ??? Project/????.
  3. ????? ???? ??????? ???? ???? ???? ?? ???? ??? ???.
  4. ?? ??????? ??????? ???? ??? ????? ????.
  5. ???? ??? ????? ??????? COM.
  6. ??? ????? ?????? HTML Microsoft ? ???? ??? ????? ?? ???? ??? ?????.

    ???????? Visual Studio 2005 ? ??? ????? ?????? Microsoft HTML ?? ???? ??? ?????.

????? ????? ???????? ?????? VBScript

??? ????? ???? ??? ????? ?????? Microsoft HTML ????? ????? ????? ???????? ???? VBScript ??? ???? ??? ???? ?? ?????? ?? ???? ???? ActiveX WebBrowser.

???? ????? ????????? ???????? ?????? ????? ??????? ???? VBScript ??? ???? ??? ???? ?? ?????? ?? ???? ???? ActiveX WebBrowser. ?????? ????? ????????? ???????? ??? ??????? IHTMLDocument.Script ?? ????? ?????? HTML Microsoft ?????? ??? ?????? ??? ?????? ??????? ??????. ?????? ????? ????????? ???????? ?? ????? InvokeMember ??????? ???? VBScript.

?????? ??????? axWebBrowser1 ?? ????????? ???????? ?????? ??? ???? ???? ???? ActiveX WebBrowser ???? ???? ?? ??????? ????? ??.
private object InvokeScript(string sFunction,object[] oParameters)
{
    object oReturn = null;
    mshtml.IHTMLDocument Doc = (mshtml.IHTMLDocument)this.axWebBrowser1.Document;
    Type ScriptEng = Doc.Script.GetType();
    try
    {
        oReturn = ScriptEng.InvokeMember(sFunction, System.Reflection.BindingFlags.InvokeMethod, null, Doc.Script, oParameters);
    }
    catch(Exception ex)
    {
        MessageBox.Show("Error invoking function: " + ex.Message,"InvokeScript - Exception", MessageBoxButtons.OK, MessageBoxIcon.Warning);
    }
    return oReturn;
}
???? ??????? ??? ??????? ?????? ????? ??? ?????? VBScript ?????????. ???? ????? ????????? ???????? ?????? ????? ??????? ????? ????????? ???????? ?????? ??? ??????? ???? VBScript ??? ???? ????? ?? 100.

?????? ???? ???? VBScript myVBScriptFunction.
String myFunction = "myVBScriptFunction";
Object[] myParameters = { 100 };
InvokeScript(myFunction, myParameters);

?????

????? ?? ????????? ??? ???? ?????? ActiveX WebBrowser ?? ?????? ???? MSDN ??????:
http://msdn2.microsoft.com/en-us/library/Aa752040.aspx

???????

???? ???????: 922275 - ????? ??? ??????: 12/?? ??????/1428 - ??????: 1.8
????? ???
  • Microsoft Visual C# 2005 Express Edition
  • Microsoft Visual C# .NET 2003 Standard Edition
  • Microsoft Visual C# .NET 2002 Standard Edition
????? ??????: 
kbmt kbwindowsforms kbhowto kbinfo KB922275 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????922275

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com