Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

What´s the NT8 equivalent to Forms.Closing event?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What´s the NT8 equivalent to Forms.Closing event?

    Is there an event for NT8 closing/closed?

    #2
    Hello FREEN,

    Thank you for the question.

    Not specifically, what is the overall use case here? The windows forms events you may have previously used would not be something which has a specific NinjaScript alternative, you would instead be looking for a WPF alternative to those actions. This is something you can use google to search for C# alternatives in contrast to WPF programming.



    I look forward to being of further assistance.

    Comment


      #3
      My objective is to close some background processes as i close NT8. Hence a closing (as in application closing) event would be in handy.

      Comment


        #4
        Hello FREEN,

        Thank you for clarifying.

        In the situation of using a NinjaScript object, it would be suggested to use the objects OnStateChange and its Terminated state to handle this type of use. If you are using a type without OnStateChange or are doing something custom where that does not apply it would be up to you to handle that case in your own custom way.

        If you were previously using the form and the windows forms events, the alternative would be wpf events however this is not something which is documented for either platform. You can research this topic further on the support forum by searching for the WPF event name you wanted to use/control you wanted to target. You can find more relevant help about WPF events in external WPF education resources.

        You can also see the following post about adding a menu to the control center for some ideas of targeting specific windows: https://ninjatrader.com/support/foru...-controlcenter


        Please let me know if I may be of additional assistance.




        Comment


          #5
          Thanks for pointing me in the right direction Jesse!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          602 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          347 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          559 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          559 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X