Hi,
I foresee no threading issues at all - VB6 apps are single-threaded and if
you expose your .NET windows form through a COM-callable object, it will run
on the caller's thread.
So here's how I'd do it:
a) Create the form
b) Create a COM-callable object that would accept the parent window's
handle, display the form modally, retrieve any return value and pass it back
to the caller.
a) and b) should reside in the same assembly.
c) Register the assembly with regasm
b) Add a reference to the assembly's type library to the VB6 project and
make use of the COM-callable object.
That's basically it, please feel free to ask further questions.
--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"x" <it*****@hotmail.com> wrote in message
news:rH*******************@news20.bellglobal.com.. .
I am currently calling a windows form from my vb6 app. I need to know the
best practice
for handling the gui thread. I wish to call the form and have it behave as
a modal dialog and obtain a notification/return value
when the form is disposed.
Is this possible?
If so how?
Many thanks and good karma in return !