Relating between Panels and commands

Hello Rhino Developers,

How can I control the command that I am building to the visibility of the panel?

I mean :
while (command is running) → no other commands can run, and then the panel pops up (panel dialog type is Form), if the user closes the panel, the command stops.

thanks
Hanan

This is usually done with a modal dialog box, not a panel.

– Dale

thanks for your reply. I changed it to a dialog box.

You can find an example here