Advantech DAQNavi ActiveX Components in Delphi 10.4 - delphi

Has anyone had any success installing the Advantech DAQNavi components in Delphi 10.3 or 10.4 ?
The big problem is that I cant find a detailed step by step explanation of how to install activex components into Delphi 10.3 or 10.4.
I pay embarcadero for support but their response is "Ask Advantech" !
I have installed the Advantech DAQNavi ActiveX components into Delphi 10.3 and everything appears to go OK without any issues but If I then add them to a form nothing shows on the form. The components appear in the structure list and I can edit them that way, the same applies if I open a project created with an earlier version of Delphi that uses the Advantech ActiveX components.
The fact that something has not worked correctly during the install worries me and I dont feel comfortable compiling projects using these components with this version of Delphi.

Following is a step-by-step guide to installing an ActiveX component for which you have a type library in Delphi Sydney (v.10.04).
Assuming you have a drive D: (I have never trusted Windows with saving important work on its boot drive), create the folder d:\D104, and 2 subfolders below it, d:\D104\Units and d:\D104Pkg.
Start the Delphi IDE if not already running, or do a Close All if it is.
Goto Component | Import Component in the IDE main menu.
Select your type lib from the pop-up
Click Next and set Palette Page to "My Imports"
Click Next and set the radio button to Install to New Package.
Click Next and set the Package name to e.g. D:\d104\Pkg\MyPackage.dpk and fill in the Description box as you think.
Click Finish. The IDE will generate
a file in D:\D104\Units named like MyTypeLib.Pas (but see the comment below step 9) and
the file D:\D104\Pkg\MyPackage.dproj
It will then attempt to compile D:\D104\Pkg\MyPackage.Bpl, which is the package that you need to install in the IDE to have the component(s) in your typelib show up on the MyImports tab of Delphi's Component Palette. Btw, a .Bpl file is a special sort of Dll which, as well as your components, contains some "behind the scenes" code to help .Bpl files get along with one another and the IDE, including memory-sharing.
Assuming the compilation generates no errors, go to Component | Install Packages in the IDE and use the Add button in the pop-up to add D:\D104\Pkg\MyPackage.Bpl and you're done.
If the compile in step 9 doesn't appear to have done anything, it's most likely because the BPL has been generated to the wrong place. Find it and delete it (because otherwise it will come back to haunt you), then:
Open D:\D104\Pkg\MyPackage.dproj as a project in the IDE, then from the IDE's main menu, click Project ! Project Options & on the Project pop-up, select the
"Delphi Compiler" tab, and on the right, set the package Output Directory to D:\D104\Pkg
and click Save, then re-compile the project and use Component | Install Packages to install the .Bpl file.
=================================
Fwiw, in the D5/D6/D7 era, adding components to the IDE was much simpler (and IME less error-prone) because you could do the entire process using a stand-alone Package Editor.\Units

Embarcadero have now looked into it and responded :
"It is bug... it was a fix, for another bug this is one of those good intentions paving fixes."
Apparently the bug simply prevents the control appearing on the form at design time and does not affect the operation of the OCX.

Related

How do I modify Indy 8 IdMessage.pas with Delphi 6?

I have a copy of Delphi 6 and a simple email program that uses the Indy TIdMessage component. I want to remove lines 464-465 of IdMessage.pas then recompile the application. I'm having a hard time finding clear documentation, so I tried these steps to modify the component:
opened \delphi6\source\indy\indy.dpk in the IDE
double-clicked IdMessage.pas in the Package window
edited IdMessage.pas and saved the file
clicked "Compile" in the Package window
clicked "Build Indy" in the Project menu
clicked "Install" in the Package window
But then I get an error that \bpl\indy60.bpl can't be loaded because \bin\indy60.bpl is already loaded. So I tried "Install packages..." in the Components menu, but only found \bpl\dclindy60.bpl there. So I removed that package, and:
opened \delphi6\source\indy\dclindy.dpk in the IDE
clicked "Compile" in the Package window
clicked "Build dclIndy" in the Project menu
clicked "Install" in the Package window
The IDE confirmed all the components (including TIdMessage) were installed, but the email program is still acting as though the original unmodified component is still being used.
What am I doing wrong?
if you were using runtime packages then you'd need to ensure that your program found the new package file, the .bpl.
But you probably are not using runtime packages. So the runtime program statically links the Indy code using .dcu files located in the Delphi installation folders. Specifically in this case to <ProgramFiles>\Borland\Delphi6\Lib\IdMessage.dcu. You need to make sure you link the new code. The easiest way is to add the modified file to your project. That will mean that the modified version gets compiled and linked into your program.
Since your modifications are in the implementation section of the unit this is all you need to do. If the modifications were in the interface section you'll encounter "Unit X was compiled with a different version of Unit Y" errors. You'd solve that by adding the rest of the Indy source to your project.
One point to stress is that you should never modify the files under the Delphi installation folder. If you want to build modifications to those components, take copies of the files and make modifications in those copies.

Error Loading a Form

I am a .Net programmer and I'm currently debugging a Delphi application and as I go along
I encountered the following error:
Could you explain to me what is this error, and how I can resolve it?
I am new to using Delphi.
Error Explanation
The error that is been presented to you is telling you that a component on that form is not registered in the IDE, in this case TsStatusBar which is from the AlphaControls library: http://www.alphaskins.com/
The form would have been saved at some point with TsStatusBar placed on the form. When any component is added onto a form they leave references to the component in both the forms source file (*.pas) and the inside the forms dfm. This is why you are getting this error, because the component cannot be found, yet the references linking to it still remain.
Option 1 - Install the AlphaControls packge
The best option would be to install the components that are missing, this will solve your error problem as shown in your question.
Option 2 - Convert Project
AlphaControls provides a tool to convert a project from standard VCL to AlphaControls and vice versa, this may be an easier option then installing the AlphaControls package or manually editing source files, the convert tool is free. Just remember to make a backup before converting should anything go wrong.
Option 3 - Manually Editing the Source Files
You could manually remove these references yourself. Do note though, if you remove the references then Delphi will no longer know that the TsStatusBar was ever there, and without a doubt there will be code somewhere that would have interacted with this component which will create compiler errors.
As an alternative to removing the references, you could rename them from TsStatusBar to TStatusBar, which is a standard statusbar from the VCL. At worst there may be some small syntax errors that may need correcting. If you do decide to edit the forms source and dfm files then I would suggest you do it before loading the form into the IDE.
Option 4 - GExperts
You can also install an IDE Expert such as GExperts which can automate the process of renaming/converting component references.
I would however advise against removing or renaming the references in this circumstance as it seems the project is reliant on the AlphaControls package.
Summary
I can see there are more components from the AlphaControls package been used, so fixing the TsStatusBar error manually will only fix part of the problem.
If the project must remain in its current state then Installing the AlphaControls package is the way to go, if you are able to edit it then I would also suggest the project convert option, this way you won't even need the AlphaControls package.
If you do chose to install the package, it is important to realise that once you install the package Delphi knows where the source files are to be able to compile. After installing the packages, goto Menu > Tools > Options from the IDE, then you need to go to Library and add the folder for the AlphaControls source to the library path. The source folder will be the one containing the most .pas files, but you could add all folders if you are unsure. If you don't add to the Library path then Delphi will not be able compile when using the new components.
Your IDE does not have the package which contains TsStatusBar installed. Find that package, build it, and install it.
Design time components need their code to be integrated into the IDE. This is done using what are called packages. The package project has extension .dpk. You should find this package project in your revision control system. Load the .dpk file in Delphi, click Build from the package manager, and finally, when built, click Install. Now that the package with your component is known to the IDE, your form will load. Whoever maintains this code in your organisation will be able to help with all the details.

JVCL Docking-Docking_in_Code example - Tab Dock possible error

I am using delphi xe2 with update 4, under OS: Win7, and I want to build an application for my semestre exam that allows docking forms. Because I am a student I can`t afford to buy any docking components. So I began to learn how JVCL Docking works by taking a look at the examples provided by JVCL 3.45 authors(thank you for them). And Now I am stuck with a possible problem.
I have opened the project from JvDocking called Docking_in_Code: all the options in the left aligned panel(Sibling DOck, Cojoined Dock) are working, but when i click Tab Dock this is the message that I get
"ManualTabDock:Ttabhost not created. Your docking style may not support tabbed docking"
Has anyone else encounterd this? I tried to write the same code in the example in my own project but the same error appears. why it appears i can`t tell:(
I'm guessing since you have made it to the stage of looking at examples, you have installed both JCL (Java Component Library) and JVCL (Java Visual Component Library) into Delphi XE2.
I have just been learning how to work with the JVCL docking components recently as well. This example was one of the first I looked at and it worked fine for me. I suggest you reinstall JCL and the JVCL then double check that the library paths are present and correct in:
Tools > Options > Environment Options > Delphi Options > Library > LibraryPath
I have the following paths saved in my directory listing:
...\jcl\jcl\lib\d16\win32
...\jcl\jcl\source\include
...\jvcl\lib\D16\win32
...\jvcl\common
...\jvcl\Resources
...\jvcl\run
If you have confirmed this all and it is still not working, it may be an idea to install the packages manually. The package version that needs to be installed is D16 for both JCL and JVCL if you need to manually compile and install the packages (the installer should do this for you though). If you open up the 'D16 Packages' delphi project you should be able to manually install the components, for first the JCL, and then the JVCL.

How to install Virtual Treeview?

Virtual treeview by Mike Lischke seems so popular on the web and as third party component. I just downloaded version 4.8.7 on my machine.
I have Delphi 2010 and Delphi 7.0 in 2 partitions.
Aftter clicking installer of virtual treeview, a log file prompts, saying it has been installed successfully.
I check Delphi 2010, yes, it is on component palette showing 3 controls.
But when I start Delphi 7.0, IDE prompts 'Can not load VirtualtreesD7.bpl...'. I ignore it, and find that Virtual treeview design time package is in list but UNCHECKED. If I try to check it, again it promts "Can not load virtualtreesD7...".
I search whole Disk and find a VirtualTreesD7D.bpl, and manually add it in design time package list. It is on palette with 3 controls.
I tested it quickly and exit Delphi 7.0. But when I restart Delphi 7.0, again it prompts "Can not load VirtualtreesD7.bpl...", it is again not on palatte and not Checked in design time package list.
This is very simple question. Can you let me know how to solve it?
Thank you very much in advance.
Edit:
Thanks for comments.
I tested your comments, but not work.
New problem:
If I uninstall virtual treeview by clicking unins000.exe and reinstall it only in Delphi 7.0, the installer prompts in the last screen ''...completed.." and no error prompts. When I start Delphi 7, the virtual treeview design time package is not in package list. This is even worse than the last time (last time it is in package list but not checked).
I check very carefully one line by one line of that log file, it says:
...
...
VirtualTreesD7.dpk(39)
VirtualTreesD7.dpk(39)
VirtualTreesD7.dpk(41)
VirtualTreesD7.dpk(43)
**VirtualTreesD7D.dpk(32) Fatal: Required package 'VirtualTreesD7' not found**
Why?
Why it does not successfully install and does not prompts the error in installation in the last install screen.
How to solve this "Fatal...not found" problem.
Thank you all for help.
New Edit: (Is this Answer?)
Thanks for your help and suggestion first.
I take 2 hours to test and find a possible solution. It works on my machine and it can be installed in Delphi 7.0.
Steps:
1. uninstall virtual treeview by clicking unins000.exe from Delphi 7.0 ( you can separately install virtual treeview in Delphi 2010)
2. clicking newly downloaded VirtualTreeview setup 4.8.7.exe, install it in Delphi 7 folder, do not install it in default...Rad..path. Important: INGNORE ALL ERROR PROMPTS DURING INSTALLATION (INCLUDING ERROR PROMPT IN THAT LARGE INSTALLATION LOG FILE).
3. Go to $\Virtual Treeview, right click VirtualTreesD7D.dpk, select Open with Delphi 32 development environment. A window prompts for you to compile. JUST CLICK COMPILE, DO NOT CLICK INSTALL.
4. Go to Component -> Install Packages. Go to $\Bpl folder and manually add VirtualTreesD7D.bpl into Design Package. The three controls will appear in Palette.
5. Go to folder $\Bpl and YOU MUST COPY VirtualTreesD7.bpl (NOT VirtualTreesD7D.bpl) INTO $\Bin folder.
6. Close Delphi 7 and restart it, you will find that this component is on Palette and in Package list, it is in Design package list and CHECKED.
I personally feel that the installer of Virtual treeview needs improvements to free users from such trouble and test in installation. The installer needs rewrite.
This is my case of installation. I do not know if it can be generalized to all users.
Thank you all.
The IDE uses LoadLibrary (actually, LoadPackage) to load packages for components that are installed. This means that it follows the same logic for where it looks for files that LoadLibrary does.
The problem is that the IDE can't find the package using LoadLibrary's search logic - see the Remarks section here. So the solution is to add the folder to Delphi's Library Path (Tools->Options->Environment Options->Delphi Options->Library - Win32), or move it somewhere on the system PATH.
Ensure you have the folder where the virtualtrees.pas (\source) is located in the environment search path.
You may manually need to install the *.dpk file for Delphi 7. Open the D7.dpk, compile then open and install the D7D.dpk (Runtime first then Designtime package)
Haven't done it on Delphi2010 w/ Delphi7, but installing with just Delphi7 is fine.
*edited

Where Is TShellListView in Delphi 2009?

We have recently moved to Delphi 2009. I can't find the TShellListView and TShellTreeView controls. Do I need to install something extra?
From searching the web it seems they are shipped with Delphi 2009 but for some reason they havent been installed.
Has anyone had a similar problem?
Answer here
It looks like this package is not installed by default.
Navigate to Delphi demos (they are in "c:\Users\Public\Documents\RAD Studio\6.0\Demos" on my machine; you should replace 6.0 with the appropriate version if you're not running Delphi 2009) and open subfolder DelphiWin32\VCLWin32\ShellControls.
Open and compile vclshlctrls.dproj.
Open and compile dclshlctrls.dproj.
While this last project is still open, right-click on the dclshlctrls120.bpl item in the Project Manager window (View, Project Manager) and select Install from the popup menu. You should see a dialog box informing you of new components. One of them is TShellListView.
Information
Package C:\Users\Public\Documents\RAD Studio\6.0\Bpl\dclshlctrls120.bpl has been
installed.
The following new component(s) have been registered: TShellChangeNotifier,
TShellComboBox, TShellListView, TShellTreeView.
New package should now also be visible in the Component, Install Packages window ("Shell Control Property and Component Editors").
I put this answer in my question, but to make it easier to find, I'll put this answer here also, this is the final bit of the puzzle that solved it for me.
It appears codegear have installed the demos to the allusers section of documents and settings
C:\Documents and Settings\All Users\Documents\RAD Studio\6.0\Demos\DelphiWin32\VCLWin32\ShellControls
Answer here

Resources