Nick Hodges put together a list of
changes to the VCL since D7 and I thought I'd pitch in and help expand since it only includes a few of the high level items. I'll try and avoid duplicating items Nick's list (no guarantees). This is by no means an exhausive list and does not include bug fixes nor does it mention cases where we've made numerous methods virtual/protected to better enable descendant classes.
- New TDragObject properties AlwaysShowDragImages and RightClickCancels
- New TDragDockObject properties EraseDockRect and EraseWhenMoving
- New classes TCustomControlAction, TControlAction, TCustomTransparentControl, TColorListBox, TTrayIcon
- Many new methods on TControlActionLink for binding to additional properties on TControls
- New Control States: csDesignerHide, csPanning, csRecreating, csAligning
- New Control Styles: csPannable (mousewheel support), csAlignWithMargins
- New events published throughout VCL: OnMouseActivate, OnMouseEnter and OnMouseLeave now with reliable enter/leave detection
- New events on TWinControl OnAlignInsertBefore and OnAlignPosition for use with alCustom alignment style
- New TWinControl property MouseInClient
- New TDragImageList property DragHotSpot
- New TDockZone property ChildControl
- TDockTree has many new methods for better mouse support
- Improved double buffered painting performance
- Updated appearance with gradient painting support for TControlBar
- New events on TControlBar BeginBandMove/EndBandMove
- New properties on TControlBar CornerEdge, DrawingStyle, GradientDirection, GradientStartColor and GradientEndColor
- New property on TColorBox: OnGetColors
- New properties on TCustomForm: PopupMode, PopupParent
- New properties on TScreen: CursorCount, FocusedForm, SaveFocusedList, PrimaryMonitor
- New properties on TApplication: ActionUpdateDelay, ActiveFormHandle, MainFormHandle, MainFormOnTaskbar, ModalLevel, ModalPopupMode, PopupControlWnd
- New events on TApplication: OnGetActiveFormHandle, OnGetMainFormHandle
- Improved drawing support meaning less flicker for many controls throughout VCL
- Constants for standard web colors added to Graphics.pas
- RGB conversion routines for working with web colors/color names
- New Pen Styles: psUserStyle, psAlternate
- New property on TFont: Orientation
- Enumerator support on numerous classes throughout VCL for use with "for...in"
- New property on TOleControl: ServiceQuery
- New action: TBrowseForFolder
- New property on TLabel: EllispsisPosition
- New property on TComboBox: AutoCompleteDelay
- New property on TListBox: AutoCompleteDelay
- New properties/events on TTabSet: Images, ShrinkToFit, TabPosition, OnGetImageIndex
- Numerous ActionBand menu enhancements
To elaborate on Nick's FastCode mention there is the following on the RTL side:
- New high performance memory manager
- FastCode routines:
- Move
- _FillChar
- _LStrCmp
- Pos
- __lldiv
- UpperCase
- LowerCase
- CompareStr
- CompareMem
- CompareText
- StrLen
- StrCopy
- StrComp
- Numerous inlined routines throughout the RTL
[Update: Mar 2, 2007] Fixed typo.
f3d62d6a-a9d4-418c-9dd3-491df3806e99|0|.0
Tags: Delphi, RTL, VCL
I read Zarko Gajic's delphi.about.com and he frequently publishes interesting articles related to Delphi. He does a great job supplying the Delphi community with a constant stream of useful programming tips. His latest post Convert Delphi's TColor to HTML Color Value has a great tip about converting color values. After reading this post it dawned on me that I've never mentioned the routines we've added to the Delphi RTL for converting colors. We also added TColor values for all of the named web colors.
You can find all of these routines in GraphUtil.pas.
{ Converts a TColor to a Web color constant like #FFFFFF }
function ColorToWebColorStr(Color: TColor): string;
{ Converts a TColor to a Web color name, returns a Web color value if the color is not a match. }
function ColorToWebColorName(Color: TColor): string;
function WebColorToRGB(WebColor: Integer): Integer;
function RGBToWebColorStr(RGB: Integer): string;
function RGBToWebColorName(RGB: Integer): string;
{ Converts a Web color name to its TColor equivalent, returns clNone if no match }
function WebColorNameToColor(WebColorName: string): TColor;
{ Converts a web style color string (#FFFFFF or FFFFFF) to a TColor }
function WebColorStrToColor(WebColor: string): TColor;
f19313a3-3fdf-4fb9-81cf-6c036fe3d754|0|.0
Tags: Delphi, RTL
Quoted:
"...but our perception and wall-clock timing tells us there
is at least a 300% increase in speed, if not more."
-Dan Miser
DistribuCon
I don't recall mentioning the ISAPIThreadPool unit here and
recently
Allen pointed out a
Borland public newsgroup post
where a customer was talking about the dramatic performance difference between
his PHP application and his
Delphi Webbroker application. In the
post he mentioned:
to have high speed I have pooled connections using a threadvar,
every IIS thread has one datamodule with opened connection
If I understand
this correctly the above is unnecessary and instead this developer should
leverage the
ISAPIThreadPool
unit available with Delphi as well as from
CodeCentral. The ISAPIThreadPool unit
leverages the technologies discussed in the following documents (also mentioned
in the source code):
A few key points:
- ISAPIThreadPool.pas should be included in your webbroker DPR at the end of
the uses clause as it reimplements GetExtensionVersion, HttpExtensionProc and
TerminateExtension.
- This unit is only useful for applications running on Microsoft's web server (IIS).
Dan Miser has also mentioned this
unit on his blog. Thanks Dan!
96520168-f46d-4186-b1ee-71e50bd9109d|0|.0
Tags: Delphi, RTL