Solved

Modeless Dialog in ActiveX DLL

Posted on 2001-07-18
3
727 Views
Last Modified: 2010-04-06
This code in VB is an ActiveX DLL:

Project LibXX
Class ClaseX
Public Sub ShowDialog()
  'This line show the dialog in modeless
  frmFormulario.Show vbModeless
End Sub

called from VB work well ...


But in Delphi i :

  frm := CreateOleObject('LibXX.ClaseX') as ClaseX;
  frm.ShowDialog; <-error

I recive an error something like that:
"Can not show dialog modeless in ActiveX DLL"


How i can do this in delphi like vb?

The problem is explained in the MSDN:

Modeless Dialog Boxes Sometimes Aren't Allowed
When you create an ActiveX DLL, you'll have one limitation: Depending on the container, modeless dialog boxes may or may not be displayed. For example, imagine that you've created an ActiveX DLL that includes an ActiveX document that shows a modeless form. If you view the document in Office Binder, showing the modeless form will present no problems. On the other hand, if you view the same document in Internet Explorer, attempting to display the same modeless form will raise an error.
Note With Internet Explorer 4.0 or later, the ability to show modeless forms is dependent on the threading model. This is discussed in "Apartment-Model Threading in Visual Basic" in "Building Code Components."


(sorry for my english)

thanks
0
Comment
Question by:Felixls
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
Epsylon earned 200 total points
ID: 6294821
The dialog needs input from somewhere. In Delphi it's Application.Handle. I don't know how to link that to a VB ActiveX DLL. This thread is about it. Maybe it gives you an idea of what I mean:

http://groups.google.com/groups?hl=en&safe=off&ic=1&th=b48f6d79d504b670,3&seekm=uSN%24FDT89GA.263%40ntdwwaaw.compuserve.com#p
0
 

Author Comment

by:Felixls
ID: 6296447
Epsilon:

Thank you for your comment, I have redefined my question.

Seemingly the Delphi EXEs are not shown as a prepared "HOST" to show forms Modeless
0
 

Author Comment

by:Felixls
ID: 6301996
Thanks.

Felix.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question