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 Hwop38, 05-04-2026, 07:02 PM
    0 responses
    182 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    334 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    258 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    358 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    187 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X