[转] Delphi 8 TIPS, TRICKS AND Speed ​​IMPROVEMENTS

xiaoxiao2021-03-06  92

Speed ​​Is The Key

Delphi

8 has become a large product with a lot of features. For various reasons, some features are hidden, and only accessible via a registry modification. Other features are often not needed, and just make the IDE slower to start. Fortunately, with a few REGISTRY HACKS, One Can Add A Few New Features, And Disable Others That The Ide BEY, MAKING The User Wants.

Playing the registry game

First off, modifying the registry is dangerous, and can potentially cause problems on your system. I only recommend modifying the registry if you really understand what you are doing. Having said that, you should understand how

Delphi

8 Uses the registry. To Start The Windows Registry Editor, Run Regedit.exe.

For

Delphi

8, The IDE NORMALLY READS All of Its Registry Settings from HKEY_CURRENT_USER / SOFTWARE / BORLAND /

BDS

/ 2.0. Previous Versions of

Delphi

Used HKEY_CURRENT_USER / SOFTWARE / BORLAND / DELPHI / . C # builder and

Delphi

8 Share The Exact Same Ide, So The Executable Was Renamed To

BDS

.exe, standing for "Borland Developer Studio". When the IDE starts, if the given registry key does not exist under HKEY_CURRENT_USER (HKCU), it will copy the contents of HKEY_LOCAL_MACHINE (HKLM) to the HKCU key. This allows the IDE to Be buy with multiple users.

Now, the IDE has a little known option that allows it to start with a different registry key. By using the command line option -rSomeString, where SomeString is any given registry key, the IDE will start using SomeString as its registry. For example, I Have a Shortcut To

BDS

.exe on my desktop with a target of: "C: / Program Files / Borland /

BDS

/2.0/bin/bds.exe "-RBareBones. When the IDE Starts, IT Reads and Writes to the registry Key HKCU / SOFWARE / BORLAND / BAREBONES / 2.0. The first time you start the ide this Way, IT Will Copy ITTINGS over from HKLM.What is the advantage of this -r registry switch? Well, it allows you to use the same IDE in different ways. By loading different packages with different registry keys, you can have one IDE tailored for just text editing, and Another tailored for all available features.

Find your keys

Now that you know where to find the registry keys, it is time to take a look at how the IDE uses them. The IDE itself is very modular. Virtually all product features are simply plugged into the IDE via packages or assemblies. Native packages are Loaded from the "knower IDE package" key..

Net

Assemblies Are Loaded from the "known IDE assembly" key. installed vcl.

Net

Components Are Loaded from The "known assembly" key.

One can speed up the start time of the IDE by disabling items that they do not use. Start the IDE with the -rBareBones option in order to leave the current settings untouched. The easiest way to do this is to create a shortcut to

BDS

.exe and modify the target to contact -rbarebones. Start The IDE ONCE (SO IT Copies The Keys over), and exit.

Image1.tif: modifying a shortcut to

BDS

.exe with the -r Option.

Now, in The Registry Editor, you Should See Something Similar To Image 2:

Image2.tif: Registry Editor Displaying The Barebones Registry Key.

Select the "Known IDE Packages" key and delete it. Repeat with "Known IDE Assemblies" and "Known Assemblies". Start the IDE again with the shortcut you created earlier. It should start very fast (it is almost instant on my laptop) ! What You now Have Is a Very Fast Text Editor, with syntax highlighting.being more selective

Now, You Probably Still Want To Use Certain Features of

Delphi

SUCH AS The Ability To Compile Applications and do Some Basic Form Designing. To do this, you will have to disable individual packages.

Start the IDE again with a different -r option, such as -rBareDelphi, and exit. Refresh the Registry Editor and select the "Known IDE Packages" key under HKCU / Software / Borland / BareDelphi / 2.0. You should again see something similar to Image2. Each Item in the list is a particular feature for the IDE. For example, "$

BDS

) /Bin/delphidotnetide71.bpl "is the core

Delphi

FOR.

Net

IDE Personality. Disabling this package Would Disable the Ability to Compile

Delphi

Applications.

Some items in the list have a descriptive description telling you what they are for. Others simply say "(Untitled)". To find out what a package is for, browse to it with Windows Explorer, right click on it and select Properties. On the Version tab, look at the Description to see what the package does. For example, the package asmview71.bpl has a Description of "Assembly Viewer". This package allows the IDE to open and browse assemblies inside of it.

Now to disable packages. It is actual quite simple; make the string value empty, and the package won't loading. Make the string value not empty, and it will load.

So, to make a "Bare Bones" Version of

Delphi

, SET All Values ​​to Have a Blank String Except The Following: Registry Entry Package Description $

BDS

) /Bin/delphidotnetide71.bpl

Core

Delphi

FOR.

Net

IDE Personality $

BDS

) /Bin/dotnetcoreide71.bpl

Core.

Net

IDE Personality $

BDS

) /Bin/dotnetdebugide71.bpl

.

Net

Debugging features $

BDS

) /Bin/idefilefilters71.bpl

IDE File Filters - (Required) $ (

BDS

) /Bin/vcldotnetdesignide71.bpl

Vcl for.

Net

Personality Features

In addition, if you want "pro"

Delphi

Features, DON 'THE WORD "Pro" in Them.

Now, When You Start The Ide IT Should Load A Lot Faster.

MAKING The IDE EVEN FASTER

I Also Mentioned The "Known IDE Assembly" Registry Key. This key is the.

Net

Counterpart to "known IDE packages". You can selectively disable assembly in this list The Same WAS AS "KNOWN IDE PACKAGES". I don't recommend disabling $

BDS

) /Bin/borland.studio.delphi.dll, AS it adds

Delphi

Features to the product.

The last key to take a look at is "Known Assemblies". Items in this list register components and / or component designers. If you do not use a certain set of components, you can disable them by setting their string values ​​to a blank String. if you don't do vcl for.

Net

Developments, you can remove all items in the list.

Hidden Features

Now for Some Cool Hidden Features in

Delphi

8. You Should Have A Registry Key Named HKCU / Software / Borland /

BDS

/2.0/Globals. If you add a new String Value named PaletteNewItems containing a value of 1, the IDE will have the Palette Wizards feature in the Tool Palette, as seen in Image3. Palette Wizards are a quick and easy way to create any item Found in The New Items Gallery.

Image 3: Palette Wizards in The Tool Palette

Another really cool hidden feature is Error Insight. In the Globals key, add another String Value named ShowMeProblemsCorbin containing a value of 1. When you type in the code editor, it will constantly update to show you small red squiggles when there is a syntax error Holding the mouse over the squiggle will show why the error Occurred.Image 4: Error Insight in Action

IF for Some Reason Error Insight Doesn't show up, you may have to register the Toolsapi Type Library. Do this with a command such as:

C: / program files / borland /

BDS

/ 2.0/binary.studio.toolsapi.tudio.toolsapi.studio.toolsapi.tudio.toolsapi.tudio.toolsapi.tudio.toolsapi.tu

Bringing it all together

Now You SHOULD HAVE THE. I common ip. I commonly find myself disabling features That I don't crete multiple Shortcuts To create Multiple Shortcuts To Create Multiple

BDS

. Each Containing a Different -r Option to Start The Ide With Gives Me The Greatest Flexibility With Of The Greatest Products.

Posted @ 9/29/2004 1:27 PM by corbin dunn

SPRECHEN SIE DEUTSCH?

................... ..

Check it out! The English translation (My Original Interview) Will Be Posted Soon.

Posted @ 9/29/2004 1:24 PM by corbin dunn

Leaving on a Jet Plane, Don't Know When I'll Be Back Again ...

My home for the next month or two is going to be somewhere in Qantas Economy Class. Starting next week we're kicking off a whole bunch of Diamondback Sneak Peeks around Asia Pacific. I'm both excited about it (After the buzz at Borcon , I'm really looking forward to seeing the reaction we get out here) and dreading it at the same time (I'm a fairly grumpy traveller at the best of times, and this schedule is ridiculous) .So the next two weeks I 'm doing the Rounds of Australia, Covering Sydney, Canberra, Melbourne, Brisbane, Adlaide and Perth, In Conjunction with the Australian Delphi User Group (adug). More details here

After that it's Japan, Malaysia, Singapore, Thailand, Korea and beyond that it gets kinda blurry. China and Taiwan will be handled by the extraordinary Gordon Li, and New Zealand has already been covered by the equally extraordinary Richard Vowles. I'll try And post photos As I go around.

I Think I Get Home Before Christmas.

Upside is I Write Most of My Eco Blog Articles ON Flights, So No Excuses over the next couple of months.

BY MALCOLM GROVES

转载请注明原文地址:https://www.9cbs.com/read-98486.html

New Post(0)