When we run the application, Internet Explorer will pick up the file from the d:\www\drbob42\ActiveX\ directory, copy it to the c:\winnt\Downloaded Program Files\ directory (overwriting the one we just created when we compiled - but with the same version), and load the ActiveForm from that directory. This will make sure that after each rebuild or recompile the ActiveForm will be placed in the c:\winnt\Downloaded Program Files\ directory.ĭuring the "Deployment", the ActiveForm will be copied to the d:\www\drbob42\ActiveX\ directory. So, in order for Delphi to know that Internet Explorer is loading the Delphi-version of the ActiveForm, we must simply set the Output Directory to that location already using the Project | Options dailog. The UKDEBUG.ocx file in the project directory).Īnd Internet Explorer will not load that particular copy of our ActiveForm, but rather it will pick up the deployed version from the d:\www\drbob42\ActiveX\ directory and copy if to either the OCCACHE directory or the "Downloaded Program Files" directory (both subdirectories of the WINNT directory in my case) and load the OCX from that particular directory.
![internet explorer ocx files internet explorer ocx files](https://www.edrawsoft.com/images/office/modifysecuritysettings.png)
![internet explorer ocx files internet explorer ocx files](https://high-powerboutique.weebly.com/uploads/1/2/3/8/123817343/615970355.gif)
So, just go to the Run | Parameters dialog, and "Browse" to the location of Internet Explorer (in the C:\Program Files\Plus!\Microsoft Internet\ directory in my case).Īlso, since I deployed the ActiveForm to the d:\This will almost work, but not quite, since Delphi will only "trigger" the breakpoint if Internet Explorer loads the version of the ActiveForm that Delphi created as output (i.e. Unfortuately, this doesn't work quite like that for DLLs and OCXs (which is just a DLL with another extension).įortunately, we can use a "hosting" application to debug DLLs, as you all probably know.Īnd in the case of an ActiveForm, the hosting application is of course.
#Internet explorer ocx files code#
In a normal Delphi application, we could just set a breakpoint to the above code line, run the applciation from the IDE, and the breakpoint would trigger if we click on the button.
![internet explorer ocx files internet explorer ocx files](https://www.asiaone.com/sites/default/files/styles/a1_og_image/public/original_images/Aug2020/20200819_microsoft.jpg)
If you want to make sure that Internet Explorer automatically updates the local version of the ActiveForm with a new(er) edition of the ActiveForm (on the server), you must make sure to check the "Auto increment release number" option in the above dialog as well. The Project | Deployment Options dialog is filled-in as follows on my machine: Warning: this will be the only line of Delphi code that you need to write for this article! Procedure TActiveFormX.Button1Click(Sender: TObject) If you click on the button, then the Edit.Text is added to the Listbox.Items using the following line of code for the Button.OnClick event handler:
#Internet explorer ocx files how to#
Since the goal of this article is (only) to show how to debug ActiveForm, I decided to give it a simple user-interface: a editbox, a button and a listbox. In our case, I also chose to specify UKDEBUG as project name, resulting in UKDEBUG.ocx as ActiveForm control.
![internet explorer ocx files internet explorer ocx files](https://www.aurigma.com/docs/us8/Install1.png)
Give it a name (like the default ActiveFormX). Just perform a File | New, and from the ActiveX tab pick the ActiveForm. In this short article, first published in UK-BUG News, I'll show a few tricks that will help us debug ActiveForms from within the Delphi (or C++Builder) IDE itself. Dr.Bob's ActiveX Programming Files featuring Debugging ActiveForms Delphi Clinic