some of my scripts are using the taskdialog to inform the user about issues. Unfortunately the taskdialog opens behind the dynamo-player. Is there an opportunity to show it infront of the dynamo player? I don’t want to drag the dynamo-player before executing.
I think Dynamo and the Dynamo Player are programmed to be always on top.
What does your dialog box look like? It’s hard to help you without more information.
That’s a really nice solution. I bet with “SW_MAXIMIZE” you can maximize it again after the user confirmed the taskdialog via the result of taskdialog.
Just wanted to show another method I use a bit using Winforms and the self.TopMost variable.
import clr
clr.AddReference('System.Windows.Forms')
clr.AddReference('System.Drawing')
from System.Drawing import *
from System.Windows.Forms import *
from System import Array, Object
class SimpleForm(Form):
def __init__(self):
# The text to show in the top bar
self.Text = "A Dialog with Information"
# The width of the form in pixels
self.Width = 500
# The height of the form in pixels
self.Height = 240
# Make the form a fixed size
self.FormBorderStyle = FormBorderStyle.FixedDialog
# Position the form in the center of the screen
self.StartPosition = FormStartPosition.CenterScreen
# Bring the form to the front of all windows
self.TopMost = True
# Show top bar controls
self.ControlBox = True
self.MaximizeBox = False
self.MinimiseBox = True
runMe = IN[0]
if runMe:
# Create the form
form = SimpleForm()
# Run the form
Application.Run(form)
else:
OUT = "Set RunMe to True";