Conditional compilatation to detect VCL or FireMonkey in a Delphi Form

This shows how to detect if your application is using FireMonkey (FMX) or VCL when using conditional compilation in a Delphi form

{$IF FMX.Types.FireMonkeyVersion >= 0} // if FireMonkey
     DoSomethingFMX;
{$ELSE}                  // its not FMX, so it must be VCL
     DoSomethingVCL;
{$ENDIF}

Continue reading “Conditional compilatation to detect VCL or FireMonkey in a Delphi Form”