Trying to create a Math Input Panel in C#

前端 未结 1 1138
迷失自我
迷失自我 2021-02-06 11:09

How do I create a Math Input Panel in C#?

I have tried to put it into a dll and call it but it just closes right away.

#include 
#includ         


        
相关标签:
1条回答
  • 2021-02-06 11:43

    In your C# project, add a reference to the COM library micautLib. Then you can use the following code (in C#):

    MathInputControl ctrl = new MathInputControlClass();
    ctrl.EnableExtendedButtons(true);
    ctrl.Show();
    

    I'm not sure if this is exactly how you're supposed to do it, but this seems to work cleanly (complete program).

    using System;
    using System.Windows.Forms;
    using micautLib;
    
    namespace MathInputPanel
    {
        static class Program
        {
            [STAThread]
            static void Main()
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                MathInputControl ctrl = new MathInputControlClass();
                ctrl.EnableExtendedButtons(true);
                ctrl.Show();
                ctrl.Close += () => Application.ExitThread();
                Application.Run();
            }
        }
    }
    
    0 讨论(0)
提交回复
热议问题