Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 love2code2trade, Yesterday, 01:45 PM
            4 responses
            28 views
            0 likes
            Last Post love2code2trade  
            Started by funk10101, Today, 09:43 PM
            0 responses
            7 views
            0 likes
            Last Post funk10101  
            Started by pkefal, 04-11-2024, 07:39 AM
            11 responses
            37 views
            0 likes
            Last Post jeronymite  
            Started by bill2023, Yesterday, 08:51 AM
            8 responses
            45 views
            0 likes
            Last Post bill2023  
            Started by yertle, Today, 08:38 AM
            6 responses
            26 views
            0 likes
            Last Post ryjoga
            by ryjoga
             
            Working...
            X