Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Do not draw form's controls at second time the form activation

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

    Do not draw form's controls at second time the form activation

    Hello NT Support and others --

    I have the script (indicator), which put the button on the chart menu and at the button click the windows form created, on which controls are drawn based on market date.

    The problem is that if I click the button first time, the form is created controls are created and all is good. But at the second button click the empty form appears. I close the form by "X" button of the form.

    I'm newbie in c# code and thinking on direction of controls killing at the form close event, but nothing happens when i close the form. I just put the following method in the script.

    private void form1_FormClosing(object sender, FormClosingEventArgs e)
    {
    //do something..
    }

    May be I should call it from the other methods, but from which one?


    Please, help

    Thank you in advance

    #2
    Alex_bbfg,

    This is unsupported programming with NinjaScript and would not be able to provide assistance.

    However, I will leave this thread open for any of our forum users to assist in helping you with this issue.
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

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