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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    131 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    74 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    117 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    111 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    89 views
    0 likes
    Last Post CarlTrading  
    Working...
    X