Grasshopper Window Minimize/Maximize Behavior -- request improvements

As you showed here Possible to have a rhino button minimize the grasshopper window?
I’ve re-made the script.
It’s so much simpler now… shame on me!

2019-10-01%2022_49_22-Window

private void RunScript(bool Minimize, bool Keep_active)
  {
    if(Minimize) Grasshopper.Instances.DocumentEditor.WindowState = System.Windows.Forms.FormWindowState.Minimized;
    else Grasshopper.Instances.DocumentEditor.WindowState = System.Windows.Forms.FormWindowState.Normal;
    if(Keep_active) this.Component.ExpireSolution(true);
  }

keep_gh_minimized_V2.gh (4.2 KB)

Same “rules” as previous version… but way lighter and simpler…

2 Likes