By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,033 Members | 1,280 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,033 IT Pros & Developers. It's quick & easy.

Displaying non-modal forms via interop from COM DLLs

P: n/a
I'm continuing work on getting my VB6 plug-ins to work within my VB.NET
application and am making reasonable progress.

I've just experienced an error that has me a bit worried though.

Many of my plugins use non-modal forms to present data to the user. They
typically open the form and then use it to display progress through whatever
operations they are performing, closing it once they have finished.

As soon as I try to use one of these through COM interop, I get the
following error message:

Non-modal forms cannot be displayed in this host application from an
ActiveX DLL, ActiveX Control, or Property Page

I have two immediate questions:

1. Why? I don't understand why this is a problem?

2. What on earth am I supposed to do about it? :) If I can't get this to
work then virtually all of my plug-in DLLs will break, which will be very
expensive to fix.

My thanks in advance,

--

(O) e n o n e
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Check out this article

http://support.microsoft.com/default.aspx?kbid=176468

--
Jared Parsons [MSFT]
ja******@online.microsoft.com
http://blogs.msdn.com/jaredpar
"This posting is provided "AS IS" with no warranties, and confers no rights"
"Oenone" <oe****@nowhere.com> wrote in message
news:U0******************@newsfe5-win.ntli.net...
I'm continuing work on getting my VB6 plug-ins to work within my VB.NET
application and am making reasonable progress.

I've just experienced an error that has me a bit worried though.

Many of my plugins use non-modal forms to present data to the user. They
typically open the form and then use it to display progress through
whatever
operations they are performing, closing it once they have finished.

As soon as I try to use one of these through COM interop, I get the
following error message:

Non-modal forms cannot be displayed in this host application from an
ActiveX DLL, ActiveX Control, or Property Page

I have two immediate questions:

1. Why? I don't understand why this is a problem?

2. What on earth am I supposed to do about it? :) If I can't get this to
work then virtually all of my plug-in DLLs will break, which will be very
expensive to fix.

My thanks in advance,

--

(O) e n o n e

Nov 21 '05 #2

P: n/a
Jared Parsons [MSFT] wrote:
Check out this article
http://support.microsoft.com/default.aspx?kbid=176468


Hi Jared,

Thanks for the link. I was initially unconvinced that this was relevant, but
the section describing the behaviour of modeless forms in some containers
does describe the problem I'm encountering.

However, this still doesn't explain (to me, anyway) why this is an issue
(particularly as the host in this case is a .NET application, not IE) or how
to work around it. The proposed solution of "don't open modeless windows"
isn't going to help me much. :-(

Regards,

--

(O) e n o n e
Nov 21 '05 #3

P: n/a
I can't seem to find any explanation of why this behavior occurs.

The only work around I can think of that _might_ work is the following. Add
a callback to your plugin API that passes back a reference to your ActiveX
control. Then use your winform app to create a non modal dialog hosting
this control via AxHost.

--
Jared Parsons [MSFT]
ja******@online.microsoft.com
http://blogs.msdn.com/jaredpar
"This posting is provided "AS IS" with no warranties, and confers no rights"
"Oenone" <oe****@nowhere.com> wrote in message
news:Mj******************@newsfe6-win.ntli.net...
Jared Parsons [MSFT] wrote:
Check out this article
http://support.microsoft.com/default.aspx?kbid=176468


Hi Jared,

Thanks for the link. I was initially unconvinced that this was relevant,
but
the section describing the behaviour of modeless forms in some containers
does describe the problem I'm encountering.

However, this still doesn't explain (to me, anyway) why this is an issue
(particularly as the host in this case is a .NET application, not IE) or
how
to work around it. The proposed solution of "don't open modeless windows"
isn't going to help me much. :-(

Regards,

--

(O) e n o n e

Nov 21 '05 #4

P: n/a
Jared Parsons [MSFT] wrote:
I can't seem to find any explanation of why this behavior occurs.
Oh well :)
The only work around I can think of that _might_ work is the
following. Add a callback to your plugin API that passes back a
reference to your ActiveX control. Then use your winform app to
create a non modal dialog hosting this control via AxHost.


Thanks for the suggestion. I should clarify that it's a simple form I'm
trying to display, not an ActiveX control. It's a COM DLL with a normal form
within it, and I'm trying to display the form.

I'll have a think about retrieving instances of the form back into the .NET
app and see if there's anything I could do with it, though. It looks like
the possibility of me running the plug-in DLLs unchanged (as I had
originally planned) has more-or-less evaporated. :(

--

(O) e n o n e
Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.