Solved

Modeless Dialog in ActiveX DLL

Posted on 2001-07-18
3
721 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: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

679 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