473,468 Members | 1,343 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Displaying non-modal forms via interop from COM DLLs

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
4 7678
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Gregory | last post by:
Hello, I've managed to build two web pages, one that can display images with associated text data in a table, and one that can resize and display images without the text. I'd like to resize the...
2
by: John B. | last post by:
I'm using <h1>MY HEADING</h1> to display a title, however I would like to show one short line of text beside it<p>The short line of text</p>, and then go back to normal. Here's an example of how...
5
by: Jelks Cabaniss | last post by:
I asked this in two of the Opera newsgroups, but except for one person who advised me to just use namespaced HTML elements in my XML, there were no replies. Has anybody here successfully used...
3
by: Deepa | last post by:
Hi Am doing a web app which has a datagrid with template columns. One of the columns has dropdowns for each row. I also have the EditCommandColumn. The problem am facing is I just see the last...
15
by: dixie | last post by:
I have a command to open the Access Options dialogue from code: DoCmd.RunCommand acCmdOptions It also opens the Database Window behind it. Is it possible to open the Options without having...
3
by: active | last post by:
I draw text in a bitmap and then draw the bitmap on a picturebox and get text that is not all displayed the same. Note the different text style in the (40, 100) area. Got any insight into...
11
by: prats | last post by:
I want to write a GUI application in PYTHON using QT. This application is supposed to take in Japanese characters. I am using PyQt as the wrapper for using QT from python. I am able to take input...
13
by: hornedw | last post by:
I have been working on a ecommerce website for myself. What I needed some assistance on was when i was trying to display the categories/subcategories for the different products. I decided to use...
7
by: Jonathan Wood | last post by:
Okay, I have a site that displays information based on user input, a couple of the items are plain strings that the user entered. I understand the risk here is that they could insert javascript...
1
by: ajos | last post by:
This may be very dumb question, but still...I am displaying a value in a input tag with the value shown as readonly... <input type=text size=18 maxlength=50 name="company" value=<%=companyCode %>...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.