473,569 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ 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 7689
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******** **********@news fe5-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******** **********@news fe6-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
7309
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 images as I go, without writing them to disk on the server. Do I need to prepare all of the resized images before I display the data from the select...
2
2268
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 it keeps displaying now: ====================== MY HEADING The short line of text
5
3086
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 Opera's CSS extension "-o-replace" to display images in generic XML? See below: --------- Opera has some nice (in theory) CSS extension to...
3
1310
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 value of the dataset for the dropdowns(in the non-edit mode). and moreover its just showing it as a label instead of a dropdown. But once I click the...
15
6831
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 the database window open as well? dixie
3
1509
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 what is happening? Cal
11
4734
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 in japanese. But I am unable to display them back to GUI. It displays some junk characters Can anyone suggest me some way how to debug the issue. ...
13
3860
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 the modified preorder tree transversal algorithm. What I wanted was on the first page is to display the catogories as follows Books (35)...
7
1500
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 or whatever in their string and, when my page displays it, that script could be executed. What is the best approach for preventing that? Thanks.
1
1535
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 %> readonly> where <%=companyCode%> is the result that is being displayed. Can i display the result in a html label or something similar which is not...
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5219
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.