Disable Corel shortcuts from the source code

Hello all,

I have a problem that Corel steals the TextChanged or KeyDown events of a non-modal window.

They are stolen because in Corel the shortcuts for certain keys are active. As soon as the shortcuts for the respective key are deleted, the events work again.

The window is a wpf window which is open from a docker/addon via Show() method.

Do you have a solution for this?

Thanks a lot in advance.

David

Parents
No Data
Reply
  • Former Member
    0 Former Member over 1 year ago

    You can call wpf following

    Button.Click+=(s,e)=>{

    MyWindow m_M = new MyWindow();
    WindowInteropHelper helper = new WindowInteropHelper(t);
    helper.Owner = GetFocus();
    m_M .Show();

    Include pInvoke to get corelDraw handler;

    [DllImport("user32.dll")]
    static extern IntPtr GetFocus();};

    But if you wants a dialog add a new item in AppUi.xslt and call him by invokeItem
    <itemData guid="5730b856-94d3-49bd-9eff-ad1d625ba7f7"
    type="wpfhost"
    appearance="dialog"
    hostedType="Addons\AFolder\ADll.dll,MyNamespace.MyWindow"
    enable="true"/>

    Button.Click+=(s,e)=>{ corelApp.FrameWork.Automation.InvokeItem("5730b856-94d3-49bd-9eff-ad1d625ba7f7");};

    Remember to change window to usercontrol in this case

Children