Skip to content

Instantly share code, notes, and snippets.

function BytesToHex(const ASource: TBytes): string;
var
target: TBytes;
begin
SetLength(target, Length(ASource)*2);
BinToHex(ASource, 0, target, 0, Length(ASource));
result := TEncoding.ANSI.GetString(target);
end;
function StringToHex(const ASource: string; AEncoding: TEncoding): string;
@UweRaabe
UweRaabe / Unit77.pas
Last active April 7, 2016 17:26
Screenshot to Metafile
unit Unit77;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, System.Actions, Vcl.ActnList;
type
TForm77 = class(TForm)
unit FMX.MeshObjects;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, System.RTLConsts,
System.Math, System.Math.Vectors, System.UIConsts, FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.Controls3D,
FMX.Types3D, FMX.Objects3D, FMX.Layers3D, FMX.Objects, FMX.Menus, FMX.Edit, FMX.Colors, FMX.MaterialSources,
System.StrUtils, System.Generics.Collections, FMX.Ani, FMX.Materials, System.Generics.Defaults;
@UweRaabe
UweRaabe / Project69.dpr
Created February 5, 2016 15:04
RegEx-Test
program Project69;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
System.RegularExpressions,
System.Classes;