General XMetaL Discussion

  • Stefan.Giehler

    Interop Events

    Participants 1
    Replies 0
    Last Activity 12 years, 10 months ago

    Hello,

    i've got the following Problem:
    I use the .net Framwork to create macro-like programs, but when i try to handle XMetal 5.5 events in my application via Interop it fails. Nothing happens.

    I tried the following code:
    [code]public partial class Form1 : Form
    {
        private XMetaL.ApplicationClass xmIn;
        private XMetaL.ApplicationEvents_SelectionChangedEventHandler handler;
        public Form1()
        {
            InitializeComponent();
            xmIn = new XMetaL.ApplicationClass();
        }

        void xmIn_SelectionChanged()
        {
            MessageBox.Show(“bla”);
        }

        private void Form1_Load(object sender, EventArgs e)
        {
           
            xmIn.Visible = true;
            handler = new XMetaL.ApplicationEvents_SelectionChangedEventHandler(xmIn_SelectionChanged);
            xmIn.SelectionChanged += handler;
            xmIn.Selection.MoveDown(XMetaL.SQMovementType.sqMove);
        }
    }[/code]

    Thank you for your help,
    Stefan

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support