Solved

Modeless Dialog in ActiveX DLL

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

829 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