Delphi5.0 is a very excellent RAD development tool. More and more people are beginning to realize this and switch to using it. However, it is not perfect. In fact, manual optimization can greatly improve its work for us. In terms of efficiency, I have gained some experience through practice, and I will share it with you through a corner of my computer report:
1: Implement smooth scrolling of the control panel:
Friends who have installed many controls know that it is not an easy task to choose one among the many controls. The mouse has to be clicked constantly. It would be great if it could scroll smoothly. Fortunately, the experts from Borland have already thought of this. :
Create a text file with the following content:
REGEDIT4
[HKEY_CURRENT_USERSoftwareBorlandDelphi5.0Extras]>
"AutoPaletteSelect"="1"
"AutoPaletteScroll"="1"
How about saving it as tip.reg, then double-clicking this file to start delphi? Isn’t it much more enjoyable?
Two: Speed up program startup:
The startup of Delphi is indeed a bit slow. It has to display the flash screen and read the registry settings. It is a kind of torture for machines with low configuration. In fact, we can completely control it through startup parameters:
Create a shortcut with the target: D:DELPHI5Delphi5Bindelphi32.exe /ns /np
(My delphi is installed in the d:delphi5 directory, you need to make corresponding changes.)
ns:no splash does not display the flash screen
np:no PRoject does not load the project
3. Observe the memory heap allocation:
Same as above, the shortcut target is: D:DELPHI5Delphi5Bindelphi32.exe /hm /hv
After that, every time you start this shortcut, you can see the changing number of heap allocated bytes on the Delphi title bar.
4. Add compilation and viewing functions in the right-click shortcut menu:
First add functions to the dpr file:
Create a text file with the following content:
REGEDIT4
[HKEY_CLASSES_ROOTDelphiProject]
@="Delphi Project"
"EditFlags"=hex:00,00,00,00
"AlwaysShowExt"=""
[HKEY_CLASSES_ROOTDelphiProjectDefaultIcon]
@="d:/DELPHI5/Delphi5/Bin/Delphi32.exe, 4"
[HKEY_CLASSES_ROOTDelphiProjectShell]
@=""
[HKEY_CLASSES_ROOTDelphiProjectShellOpen]
@="&Open"
"EditFlags"=hex:01,00,00,00
[HKEY_CLASSES_ROOTDelphiProjectShellOpencommand]
@="d:/DELPHI5/Delphi5/Bin/Delphi32.exe /ns %1"
[HKEY_CLASSES_ROOTDelphiProjectShellOpenddeexec]
@="[open("%1")]"
[HKEY_CLASSES_ROOTDelphiProjectShellOpenddeexecapplication]
@="DELPHI32"
[HKEY_CLASSES_ROOTDelphiProjectShellautobuild]
"EditFlags"=hex:01,00,00,00
[HKEY_CLASSES_ROOTDelphiProjectShellautobuildcommand]
@="D:/DELPHI5/Delphi5/Bin/delphi32.exe /ns %1 /b"
[HKEY_CLASSES_ROOTDelphiProjectQuickView]
@="*"
Save it as Delphiproject.reg, and then double-click this file. In the future, you can find an autobuild item in the right-click shortcut menu of the project file with the suffix dpr. You can immediately compile and generate the executable file, and there is also a quick view item. item, you can view the file contents without opening Delphi.
Then add functions to the pas file:
Create a text file with the following content:
REGEDIT4
[HKEY_CLASSES_ROOTDelphiUnit]
@="Delphi Source File"
"EditFlags"=hex:00,00,00,00
"AlwaysShowExt"=""
[HKEY_CLASSES_ROOTDelphiUnitDefaultIcon]
@="d:/DELPHI5/Delphi5/Bin/Delphi32.exe,5"
[HKEY_CLASSES_ROOTDelphiUnitShell]
@=""
[HKEY_CLASSES_ROOTDelphiUnitShellOpen]
@="&Open"
[HKEY_CLASSES_ROOTDelphiUnitShellOpencommand]
@="d:/DELPHI5/Delphi5/Bin/Delphi32.exe /ns /np"
[HKEY_CLASSES_ROOTDelphiUnitShellOpenddeexec]
@="[open("%1")]"
[HKEY_CLASSES_ROOTDelphiUnitShellOpenddeexecApplication]
@="DELPHI32"
[HKEY_CLASSES_ROOTDelphiUnitShellcompile]
"EditFlags"=hex:01,00,00,00
[HKEY_CLASSES_ROOTDelphiUnitShellcompilecommand]
@="D:/DELPHI5/Delphi5/Bin/dcc32.exe %1"
[HKEY_CLASSES_ROOTDelphiUnitQuickView]
@="*"
Save it as delphiunit.reg, and then double-click this file. In the future, you can find an additional compile item in the right-click shortcut menu of the source code file with the suffix pas. You can immediately compile and generate the dcu file, and there is also an additional quick view item. , you can view the file contents without opening Delphi.
Please note that your Delphi installation path needs to be changed accordingly. Friends who are not familiar with the registry must carefully make a backup.