Compile-time error in generated proxy[.cs]

  • 06-24-2008 9:43 AM In reply to

    • Melody
    • Top 10 Contributor
    • Joined on 04-26-2007
    • Syracuse, NY
    • Posts 217

    Re: Compile-time error in generated proxy[.cs]

    Igor,

    Thanks for checking out VSTA.  The problem is you are generation a proxy for a class which uses an external base class (frmMain : System.Windows.Forms.Form).  When you generated the proxy file the following warning probably came up:

    ProxyGen.exe Warning: 0 : Warning: Using an external type as a base type will on
    ly work if those types are wrapped.


    If you check out the ShapeAppBasicCSharp sample you will notice that the ApplicationForm is not exposed to ProxyGen (marked isExcluded="true" in the descriptor file).  Instead the Application class is which uses the interface System.Windows.Form.IWin32Window and holds the ApplicationForm as an internal variable which is also not exposed (isExcluded="true").

    If you would like a smaller sample which shows how to handle form with VSTA v 1 check out our EventSample.

    Please let me know if you have any more questions (and your English is excellent).
    Thanks!
    -Melody

Copyright Summit Software Company, 2008. All rights reserved.