Solved

Modeless Dialog in ActiveX DLL

Posted on 2001-07-18
3
710 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
  • 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now