Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SendKeys Use with NT8

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

  • -=Edge=-
    replied
    Originally posted by jhowinvest View Post
    This is the error I get when I add using System.Windows.Forms to my code:

    'Button' is an ambiguous reference between 'System.Windows.Controls.Button' and 'System.Windows.Forms.Button

    this is in reference to "private Button exampleButton;"

    Controls and Forms both have buttons and because of both using statements, your code doesn't know which one you are refereeing too.. declare your button specifically with one or other..

    Code:
     private Systems.Windows.Controls.Button exampleButton = new System.Windows.Controls.Button();

    Leave a comment:


  • jhowinvest
    replied
    Thank you for your reply. I have used send keys to do anything I can assign a hot key to like
    1) open new chart
    2) draw line
    3) copy
    4) paste
    5) send right click events and send keys to open and load chart templates
    6) set colors to transparent or another color so items would show/hide


    They are all tied to button clicks on a custom toolbar I made. There probably are easier ways but with my more limited coding skills the sendkeys allowed me a simple method to do many things.

    This is the error I get when I add using System.Windows.Forms to my code:

    'Button' is an ambiguous reference between 'System.Windows.Controls.Button' and 'System.Windows.Forms.Button

    this is in reference to "private Button exampleButton;"

    Please let me know if more details are needed. Thanks again for your help.

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello,

    Thank you for the question.

    This would be expected as NinjaTrader 8 does no use Windows Forms but instead uses WPF.

    You can add the DLL reference to System.Windows.Forms if needed but there may be other ways to do what you are currently doing with sendkeys, can you provide more details on what this would be used for?

    I look forward to being of further assistance.

    Leave a comment:


  • jhowinvest
    started a topic SendKeys Use with NT8

    SendKeys Use with NT8

    I have NT7 indicators where I used SendKeys.Send to use hot keys etc. When I try to use send keys in NT8 I need :using System.Windows.Forms;" but I am getting errors when I add that to the using declarations. Any workarounds for this?

Latest Posts

Collapse

Topics Statistics Last Post
Started by jclose, Today, 09:37 PM
0 responses
4 views
0 likes
Last Post jclose
by jclose
 
Started by WeyldFalcon, 08-07-2020, 06:13 AM
10 responses
1,413 views
0 likes
Last Post Traderontheroad  
Started by firefoxforum12, Today, 08:53 PM
0 responses
9 views
0 likes
Last Post firefoxforum12  
Started by stafe, Today, 08:34 PM
0 responses
10 views
0 likes
Last Post stafe
by stafe
 
Started by sastrades, 01-31-2024, 10:19 PM
11 responses
169 views
0 likes
Last Post NinjaTrader_Manfred  
Working...
X