• 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 Kovalev, Today, 02:07 AM
            0 responses
            2 views
            0 likes
            Last Post Kovalev
            by Kovalev
             
            Started by kunkun80, Today, 01:37 AM
            0 responses
            1 view
            0 likes
            Last Post kunkun80  
            Started by Mykro, Yesterday, 02:51 PM
            2 responses
            12 views
            0 likes
            Last Post Dan_D_Trader  
            Started by Dan_D_Trader, Today, 12:41 AM
            0 responses
            3 views
            0 likes
            Last Post Dan_D_Trader  
            Started by jtrading82, Yesterday, 04:05 PM
            1 response
            14 views
            0 likes
            Last Post bltdavid  
            Working...
            X