[Python.NET] Showing modal .NET dialogs from Python
Mike and Viv Kelly
mikeandvivkelly at yahoo.co.uk
Thu Mar 11 09:40:09 EST 2004
Hi Jill.
Have a look at the documentation where it describes using 'Assembly.LoadWithPartialName'. I think you need to do something like this:
from CLR.System.Reflection import Assembly
Assembly.LoadWithPartialName("MyColleaguesFile")
from CLR.MyColleaguesFile import MyColleaguesForm
Then you can use the class natively. The above assumes that the assembly can be located in the existing path (e.g. current working directory). If not, add its location to sys.path.
Also assumed is that the namespace for the class is the same as the assembly file name. If not, use the correct one in the third line above, e.g. CLR.MyColleaguesNamespace.
Mike
---------------------------------
From: pythondotnet-bounces at python.org [mailto:pythondotnet-bounces at python.org] On Behalf Of Jill-Connie Lorentsen
Sent: 11 March 2004 04:16
To: pythondotnet at python.org
Subject: [Python.NET] Showing modal ..NET dialogs from Python
I am new to this, so please excuse me if I'm not making myself 100% clear.
My colleague is writing a modal dialog using ..NET. I want to show it from Python, but I can't figure out how.
I guess it'll be something like:
import CLR
import CLR.System.Windows.Forms as MyForm
from MyColleaguesFile import MyColleaguesForm
MyForm = MyColleaguesForm
MyForm.Show()
I've looked at the helloform, splitter and wordwin examples, the mailinglist archive etc, but I feel like I'm missing something. Is it even possible to do what I want to do?
Thanks!
Jill
---------------------------------
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythondotnet/attachments/20040311/3f1faeed/attachment.html
More information about the PythonDotNet
mailing list