none
Ambedding Forms in a running host application? RRS feed

  • Question

  • Hi there,

    I'm quite new to the whole .NET parade, so my question might sound trivial to you, for which I'd be very happy as I've been trying to figure this one out for the past two days without success.

    The thing is, I'm a Technical Artist in the VFX industry and I'm used to use .NET objects (ListViews, Buttons etc...) in 3ds Max (an animation/vfx 3D package) which has native support for .NET, so I don't
    have to care about Forms to be drawn correctly etc...

    However, I also work with Maya (yet another 3D package), which doesn't have native .NET support and therefore I need to connect to .NET via PythonNET libraries. All is fine, I can create my forms with UI objects and connect them in relation to Maya, no problems there. However, when I click inside Maya, the Form "drops behind" it so I can't navigate in Maya while at the same time have access to the Form.

    Is there a way to get the form "stick" with Maya? I've read that I can setup ownership of the Form, but it requires another Form to be the Owner. However, how do I setup "ownership" of an already running application? I managed to get the PID of the running Maya process etc... but is it of any use? (you can run multiple instances of Maya, so this might be preferred, if possible).

    Thanks a lot in advance, cheers,

    - loocas
    Tuesday, September 16, 2008 5:52 PM

Answers

  • The form's owner needs to be set.  That's normally done with an argument to the form's Show() method.  The owner doesn't have to be a form anything that has a Window handle suffices.  How that's done with Maya is unguessable, you'll have to contact them for support.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Monday, September 22, 2008 7:54 AM
    Tuesday, September 16, 2008 7:17 PM
    Moderator