C#, COM, Nav 5. events

xyliganxyligan Member Posts: 10
I`m trying to get events to work in my grid, in C#.
But Nav doesn`t see them
This is my code:
[assembly: ClassInterface(ClassInterfaceType.AutoDual)]
namespace GridNewDB
{    
    [ComVisible(false)]
    public delegate void DataChangedEvent(string changedPrimaryKeyFrom);

    [Guid("A26E27C7-E2F8-4d10-9985-5AAEBCEA01B6")]
    [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)]
    public interface GridMethod
    {      
        void ShowGrid();
    }
    [Guid("70BFA011-12EA-4cce-89DB-06755542E96B")]
    [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIDispatch)]
    public interface GridForm
    {       
        void DataChanged(string changePrimaryKeyFrom);
    }    

    [ProgId("GridNewDB")]
    [ClassInterface(ClassInterfaceType.None)]
    [ComSourceInterfaces("GridNewDB.GridForm, GridNewDB")]
    public partial class Form1 : Form, GridMethod 
    {}
   /// DataChaned("");

Comments

  • xyliganxyligan Member Posts: 10
    UP:
    changed WithEvents Property to True,
    event appears in nav, but when it starts, nav shows error and trying to send error.
Sign In or Register to comment.