how to associate .dpr extension in RadStudio XE3 option? - delphi

My Rad Studio cant open default extension (like dpr, dproj , pas ). How i can associate these extensions in the RAD Studio XE3 option? I search in the Tools->Options but i don't find path for do that.
Thanks.

Merge this into your registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.DPR]
#="BDS.DprFile"
[HKEY_CLASSES_ROOT\BDS.DprFile]
#="Delphi Project File"
"FriendlyTypeName"=hex(2):40,00,25,00,43,00,6f,00,6d,00,6d,00,6f,00,6e,00,50,\
00,72,00,6f,00,67,00,72,00,61,00,6d,00,46,00,69,00,6c,00,65,00,73,00,25,00,\
5c,00,45,00,6d,00,62,00,61,00,72,00,63,00,61,00,64,00,65,00,72,00,6f,00,5c,\
00,53,00,68,00,65,00,6c,00,6c,00,5c,00,42,00,44,00,53,00,53,00,52,00,2e,00,\
64,00,6c,00,6c,00,2c,00,2d,00,31,00,37,00,30,00,39,00,00,00
[HKEY_CLASSES_ROOT\BDS.DprFile\DefaultIcon]
#="\"C:\\Program Files (x86)\\Embarcadero\\RAD Studio\\10.0\\Bin\\delphicoreide170.bpl\",3"
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell]
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell\Open]
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell\Open\Command]
#="\"C:\\Program Files (x86)\\Embarcadero\\RAD Studio\\10.0\\Bin\\bdsLauncher.exe\" \"C:\\Program Files (x86)\\Embarcadero\\RAD Studio\\10.0\\Bin\\bds.exe\" /np"
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell\Open\ddeexec]
#="[open(\"%1\")]"
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell\Open\ddeexec\application]
#="bdslauncher"
[HKEY_CLASSES_ROOT\BDS.DprFile\Shell\Open\ddeexec\topic]
#="system"
Obviously this assumes your XE3 lives in the same place as mine. If it's elsewhere on your machine, then update the paths accordingly.
This is probably easier than an wholesale re-install.

Related

How Delphi "Tools - Options - Environment Options - Delphi Options - Library-Win32 - Libary path" (for dcu's) is named in Delphi 10.X (Sydney)?

I am using "Tools - Options - Environment Options - Delphi Options - Library-Win32 - Libary path" variable to keep the semicolon-separated lists of paths for the directories in which I am keeping *.dcu files (Delphi compiled units) in the older Delphi versions, e.g. Delphi 2009.
Now I have Delphi 10.4 Sydney and it does not have such option. Which Delphi 10.4 Sydney option replaced the older Library path?
My guess is that Delphi 10.4 used 'Tools - Options - IDE - Environment Variables - System Variables - BDSBIN' or its 'User Sytem Overrides' as the Library Path. But I have confusion about this, becase my installation contains the value "c:\program files (x86)\embarcadero\studio\21.0\bin" currenty and I am afraid to put additional directories here. The name "BDSBIN" seems so venerable that it may be allowed to contain only one directory only? Or is it possible to add semicolon-separated directory list here as well?
Context: I am trying to use https://github.com/theilgaz/FGX in my Delphi 10.4 Sydney and it puts all the dcu files beside the pas files. So - my intention was to copy dcu files in the separate library directory and add this directory to the Library Path and I am not sure wheter the BDSBIN is the library path for Delphi 10.4 Sydney or should I look in other Delphi 10.4 Sydney environment variable for the list of library paths?
Ever since Embarcadero released its first RAD Studio in 2010 both Delphi and former C++ builder share the same IDE.
So in order for IDE to now support two programming languages at the same time certain options that are language specific had to be grouped together.
This is why you can now fin the mentioned Library settings in Tools>Options>Language>Delphi Options>Library instead.
And if you would have C++ builder licence as well then the library path settings would be found in Tools>Options>Language>C++ Options>Paths and Directories

How can I change the IDE language of Delphi XE7

I want to change the language of the Delphi XE7 IDE from German to English. BDSSetLang.exe doesn't work for the toolbar and menu items (e.g. 'File / Open project' instead of 'Datei / Projekt öffnen').
Use BDSSetLang.exe in the bindirectory of your Delphi installation.
Did you notice that there are separate settings for the IDE UI and the Library?
QUICKFIX: Move all *.de files from the folder C:\Program Files (x86)\Embarcadero\Studio\15.0\bin\ to another location (so you can move them back if it does not work). If that fixes your issue, delete them.
(Or *.fr for French or *.ja for Japanese- (English is default).
for current versions (Delphi 10.4.2), the solution here works for me:
>cd C:\Program Files (x86)\Embarcadero\Studio\21.0\bin
>bdssetlang en

Memory leak in TShellChangeThread

I have encountered a problem in which setting AutoRefresh to True in TShellListView leads to memory leaks. This is a known problem, I found a fix for it here: http://www.delphigroups.info/2/bf/292629.html.
My problem is that my application is currently compiled with Delphi 2010 (Rad Studio 7), and that version does not include source for ShellCtrls.pas, which must be modified to implement the fix described above.
I also have a copy of Rad Studio 9 (Delphi XE) on my development machine. This version does include a copy of ShellCtrls.pas. Hoping against hope, is it possible to use the source from XE in 2010? If not, is there any way to get a hold of the of the source for ShellCtrls for Delphi 2010?
Source code is included for all Professional and higher SKUs (although the VCL source included varies based on SKU, the demos usually don't because they want you to want the functionality and therefore upgrade your SKU). If you don't have the source in D2010, you're either looking in the wrong place (it's in the Samples or Demo folder, not the VCL source folder) or you've not installed the demos.
The demos are installed by default in the Users\Public\Documents\ tree; you can find them using the Start Menu for the version of Delphi/RAD Studio you're using.
For example, for Delphi 2007 they're located in C:\Users\Public\Documents\RAD Studio\5.0\Demos on Win7, and the ShellControls folder is specifically in C:\Users\Public\Documents\RAD Studio\5.0\Demos\DelphiWin32\VCLWin32\ShellControls.
In XE2, that changes very little; they're in C:\Users\Public\Documents\RAD Studio\9.0\Samples\Delphi\VCL\ShellControls.
(Just as an FYI thing: On Delphi 7 under WinXP, they're in C:\Program Files\Borland\Delphi7\Demos\ShellControls, so the ShellControls stuff has been around at least that long with source.)

DELPHI Compiler Path settings after INDY 10 upgrade

I already asked how to upgrade to the latest Indy TCP TP components version ( GET INDY COMPONENTS ) and Installed Indy 10 with DELPHI XE 2 now. For all the Indy projects I defined an outfolder in the project options section of DELPHI XE2, here I found later all the the .bpl files and all the -DCU#s files I need now in order to compile my application using the new INDY components to add this output folder as a library search path in these projects.
I found at my XE2 installation a path/folder with *.dcu files for x32, x64, release and debug mode (C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\lib\win64\release).
Do I need now all the INDY *.dcu I have created also in these different flavours compiled, how to set the path for all project to use the new *.dcu from my folder ?
Should I copy all my dcu's to these many sub folders ??
You should not replace the pre-installed Indy files with the updated compiled files (in case you need the originals in the future, such as for DataSnap projects). Install the newer Indy into its own separate folder, then update the projects search paths to refer to that installation's output folder(s) instread of the pre-installed folder(s).
You should not overwrite the .dcu files that are part of the Delphi installation. What's more, I would not recommend that you do anything with the .dcu files that you used to build these .bpl files.
What you should do is to include the Indy source files, the .pas files, in your project. Personally I prefer to avoid using a search path to achieve that and instead simply add all the necessary .pas files to the project. But you may prefer to use the search path option.
But the main point is that since this project is supplied in source form it is best to compile the source yourself, as part of your project. That makes it much easier for you, whilst debugging, to step through the Indy code. There's no need to have separate DCU files for release and debug. It makes the build process simpler, only one thing to build. It makes it easier if your source code targets multiple Delphi compiler versions.

how to show the files thumbnails like windows explorer in delphi?

I use the TFileListBox control to show lists of files. But I wonder how to show the file thumbnails in the same way that Windows Explorer does?
You should try using the ShellControls components included in Delphi. (Note that David Heffernan sort of mentioned, and TLama made the initial specific suggestion in the first two comments to your question.) They're not installed by default in recent versions, so you'll have to install them yourself.
These instructions are for the version of Delphi you've indicated you're using (Delphi 2010) - they're the same basically for XE/XE2, except they're in the Samples\Delphi\VCL\ShellControls folder instead (and the Start entry contains XE or XE2 instead of 2010, of course).
Use Start->All Programs, navigate to the Embarcadero RAD Studio or Embarcadero Delphi 2010 item, expand it, and choose Demos. It's in the Win32 folder under DelphiWin32\VCLWin32\ShellControls. Open and build the vclshlctrls.dproj first, and then build and install the dclshlctrls.dproj. You'll need to add the folder above to your Project->Options in the search path for the compiler to be able to find them.
To install the components after building the second package, right-click on the project in the 'Project Manager' and choose 'Install' from the popup (context) menu. The 'Project Manager' in the default configuration is the area on the right edge of the screen that displays the files in the project. Remember, you need to build vclshlctrls first, and then install dclshlctrls, which is the design-time package.
You should then find the TShellListView, TShellTreeView, TShellComboBox, and TShellChangeNotifier components on your palette in the Samples category.
.thumb files are ordinary png files, just with a different file suffix.
Knowing this one can display them in a TImage.
First the .thumb extension needs to be registered as new file format.
For this include PngImage in your uses and call this:
MyImage.Picture.RegisterFileFormat('thumb', 'PNG based thumbnails', TPngImage);
Later you can display the thumb file you like like this:
MyImage.Picture.LoadFromFile('d:\Pictures\Pictures.thumb');

Resources