• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to call FindWindow, PostMessage

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

    How to call FindWindow, PostMessage

    I want to occasionally post a windows message to via PostMessage from my indicator to another window.



    How do you call FindWindow and PostMessage from c# in NT7?

    #2
    Hello AusTrader,

    When you mention "from my indicator to another window" are you referring to a new window within NinjaTrader?

    Or are you referring to an external application?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I am referring to an external application.

      I have now resolved the problem by creating a .NET 3.5 DLL in Visual Studio 2013 to call FindWindow and PostMessage.


      It would be cleaner to be able to call it direct from NT7 but this external DLL is working fine.

      Comment


        #4
        Hello AusTrader,

        This would be outside of what is supported by NinjaTrader Support.

        Should you need further assistance, this thread will remain open for any community members that would like to assist.

        You can also contact a professional NinjaScript Consultant who would be eager to create or modify this script at your request or assist you with your script. The NinjaTrader Ecosystem has affiliate contacts who provide educational as well as consulting services. Please let me know if you would like our business development follow up with you with a list of affiliate consultants who would be happy to create this script or any others at your request.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by AusTrader View Post
          I am referring to an external application.

          I have now resolved the problem by creating a .NET 3.5 DLL in Visual Studio 2013 to call FindWindow and PostMessage.


          It would be cleaner to be able to call it direct from NT7 but this external DLL is working fine.
          Much cleaner indeed.

          I found this by searching for "C# FindWindow" in Google.

          Comment


            #6
            Don't forget to add this,

            Code:
            using System.Runtime.InteropServices;
            to the top of your code.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NinjaCustomer, Today, 10:06 AM
            3 responses
            7 views
            0 likes
            Last Post NinjaTrader_JoshG  
            Started by crabman777, Today, 09:52 AM
            3 responses
            12 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by Arkadiy_B, Today, 06:43 AM
            0 responses
            4 views
            0 likes
            Last Post Arkadiy_B  
            Started by leontancfa, Today, 06:09 AM
            1 response
            15 views
            0 likes
            Last Post NinjaTrader_PatrickG  
            Started by soulfx, 12-01-2017, 08:44 AM
            3 responses
            1,023 views
            0 likes
            Last Post NinjaTrader_EricB  
            Working...
            X