Casting IDispatch RRS feed

  • Question

  • Hi,

    I have a VB form which has the following property :

    Public Property Get MySplit() As Object
       Set MySplit = ToolMeGet
    End Property
    I did the following
    1. Created a ActiveX EXE of this program
    2. Used tlbimp to create an interop
    3. Add reference to this Interop in my C# project

    This returns to me a metadata in my C# program as

    namespace MyWindow
         public interface _Window
             object Form { get; set; }
    I am getting the Form itself as an object and am running wild to access the properties of this form. I am sure it is doing late binding because I am able to get the vb form name using the code below:

    My problem is to get the correct type of the form and ultimately get the VB properties MySplit() accessable.

    Thursday, April 9, 2009 10:47 AM