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!
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…