2 Replies Latest reply on Dec 4, 2014 10:42 AM by Mohammed Elkalakhi

    Prevent Property manager page from closing

    Mohammed Elkalakhi



      I have developped a property manager page, when I show it and I press return key it closes.


      How can I prevent property manager page from closing when I press return key?


      Thank you in advance.

        • Re: Prevent Property manager page from closing
          Oleg Bezyaev
          public class PMPHandlerPart: IPropertyManagerPage2Handler8
          public bool OnKeystroke(int Wparam, int Message, int Lparam, int Id)
                          case (int)Keys.Enter:
                          case (int)Keys.Escape:
                              //swModel.Extension.RunCommand((int)swCommands_e.swCommands_PmCancel, "");
                      //if (Wparam != (int) Keys.Enter)
                      //    //Whatever code Enter is supposed to accomplish goes here
                      //    //return false; // Tells SolidWorks that this keystroke should not be handled after this method call
                      return false; // Everyother keypress is not handled by this method, so SolidWorks should still process it.