The TransparentColor property of TDXPictureCollectionItem is a Delphi TColor, so you can simply use $00FF00FF for magenta and it should work. For TDirectDrawSurface, however, TransparentColor is in the format of the surface. You can use the ColorMatch method to set the TransparentColor of a surface to a TColor value, like so:
[pascal]Surface.TransparentColor := Surface.ColorMatch($00FF00FF);[/pascal]