Updated version compatible with Delphi2010+.
function WideStringToString(const ws: WideString; codePage: Word): AnsiString; |
function StringToWideString(const s: AnsiString; codePage: Word): WideString; |
function GetDecimalSeparator: Char; |
function GetThousandSeparator: Char; |
function GetDateSeparator: Char; |
function GetTimeSeparator: Char; |
function UpdateToDecimalSeparator(const s: string): string; |
function UpdateToDateSeparator(const s: string): string; |
function UpdateToTimeSeparator(const s: string): string; |
function RemoveThousandSeparator(const s: string): string; |
function CleanString(const s, CharsToRemove: string): string; |
function CleanLastEOL(const s: string): string; |
function CleanNumericString(const s: string): string; |
function CleanDateTimeString(const s: string): string; |
function ScanFormattedDateTime(DateTimeStr, Format: string; var ADate: TDateTime): Boolean; overload; |
function ScanFormattedDateTime(DateTimeStr, Format: string; var ADate: TDateTime; const FormatSettings: TFormatSettings): Boolean; overload; |
function FormattedStrToDateTimeDef(DateTimeStr, Format: string; Default: TDateTime; DatePartOnly: Boolean): TDateTime; |
function DateTimeToFormattedStr(ADateTime: TDateTime; Format: string; TimeOnly: Boolean = false): string; |
function StrToDateEx(Text: string; var AsDate: TDateTime; Default: TDateTime; MinDate: TDateTime = 0; MaxDate: TDateTime = 0): Boolean; |
function GetThemeServices: TCustomStyleServices; |
function GetStyleFontColor(AColor: TColor; AStyleFont: TStyleFont): TColor; |
function GetStyleBkColor(AColor: TColor; AStyleColor: TStyleColor = scGrid): TColor; |
function GetThemeEnabled: Boolean; |
function GetStyleSystemColor(AColor: TColor): TColor; |
function GetStyleFontColor_LabelText(AColor: TColor): TColor; |
function GetStyleFontColor_ButtonText(AColor: TColor; Disabled: Boolean = false): TColor; |
function GetStyleFontColor_ComboBox(AColor: TColor): TColor; |
function GetStyleFontColor_ListBox(AColor: TColor; Selected: Boolean = false): TColor; |
function GetStyleFontColor_GridText(AColor: TColor; Fixed: Boolean = false; Hot: Boolean = false; Pressed: Boolean = false): TColor; |
function GetStyleBkColor_GradientBase(AColor: TColor): TColor; |
function GetStyleBkColor_ComboBox(AColor: TColor): TColor; |
function GetStyleBkColor_ListBox(AColor: TColor): TColor; |
function GetStyleBkColor_Grid(AColor: TColor): TColor; |
function GetStyleColor_GridCellBorder(AColor: TColor): TColor; |
function GetHotTrackCoord(HotTrack: THotTrackCellInfo): TGridCoord; |
procedure SetHotTrackCoord(var HotTrack: THotTrackCellInfo; X, Y: integer); overload; |
procedure SetHotTrackCoord(var HotTrack: THotTrackCellInfo; GridCoord: TGridCoord); overload; |
function CheckHotTrackCoord(HotTrack: THotTrackCellInfo; X, Y: integer): Boolean; overload; |
function CheckHotTrackCoord(HotTrack: THotTrackCellInfo; GridCoord: TGridCoord): Boolean; overload; |
procedure DPI_SetFontHeight(AFont: TFont); |
procedure DPI_ScaleFontHeight(AFont: TFont; M, D: integer); overload; |
procedure DPI_ScaleFontHeight(AFont: TFont; ScaleRatio: double); overload; |
function DPI_ScaleSize(Size: integer): integer; |
function FillStrL(const s: string; By: Char; Len: integer): string; |
function FillStrR(const s: string; By: Char; Len: integer): string; |
function AnsiPosEx(const Substr, s: string; From: integer = 1; CaseSensitive: Boolean = false): integer; |
function FindStrPart(const s, Separator: string; Sequence: byte; CaseSensitive: Boolean = false): string; |
function RemoveStrPart(var s: string; const Separator: string; CaseSensitive: Boolean = false): string; |
function FindStrFromTo(const SubstrStart, SubstrStop, s: string; CaseSensitive: Boolean = false; ExtractSubstrStart: Boolean = false): string; |
function ClearStr(const Substr, s: string; CaseSensitive: Boolean = false): string; |
function ReplaceStr(const OldSubstr, NewSubstr, s: string; All: Boolean = true; CaseSensitive: Boolean = false): string; |
function ReplaceStrFromTo(const OldSubstrStart, OldSubstrStop, NewSubstr, s: string; ReplaceSubstrStop: Boolean = true; All: Boolean = true; CaseSensitive: Boolean = false): string; |
procedure AddToSepList(var List: string; const StrToAdd: string; const Sep: string = ', '); |
function ContainWholeWord(const Substr, s: string; Separators: TSysCharSet; StartPos: integer = 0): Boolean; |
function ExistsInSepList(const Substr, s: string; Separator: string; TrimSpaces: Boolean = true): Boolean; |
function VarToString(PointToVar: Pointer; LengthVar: integer): string; |
function StringToVar(PointToVar: Pointer; LengthVar: integer; s: string): Boolean; |
function GetLine(const StrList: string; Index: integer): string; |
function SetLine(const StrList, Line: string; Index: integer): string; |
function IntToStr0(Int: integer; Len: integer): string; |
function CreateF(const FormClass: TFormClass; var Ref; AddToFormList: Boolean = true): Boolean; |
function FreeF(var Ref): Boolean; |
function CreateShowFM(const FormClass: TFormClass; var Ref): integer; |
procedure CreateShowF(const FormClass: TFormClass; var Ref); |
procedure FreeAllF; |
function GetActiveOwner: TComponent; |
procedure FocusNextControl(Form: TForm); |
function ShowWinHelp(Form: TForm; Command: Word; Data: integer; var CallHelp: Boolean): Boolean; |
function ShowExtHelp(Form: TForm; Command: Word; Data: integer; var CallHelp: Boolean): Boolean; |
function CreateMenuItem(Owner: TComponent; Caption: string; Tag: integer; OnClick: TNotifyEvent): TMenuItem; overload; |
function CreateMenuItem(Owner: TComponent; Caption: string; ShortCut: Word; Tag: integer; OnClick: TNotifyEvent): TMenuItem; overload; |
function CreateMenuItem(Owner: TComponent; Caption, Hint: string; ShortCut: Word; Tag, ImageIndex: integer; OnClick: TNotifyEvent; Action: TAction): TMenuItem; overload; |
procedure DefineEditPopupMenuItems(PM: TPopupMenu; OnClick: TNotifyEvent); |
procedure RaiseErr(ErrDesc: string); |
function ChCursor(const TypCursor: TCursor): TCursor; |
function WCursor: TCursor; |
function NCursor: TCursor; |
function SQLCursor: TCursor; |
procedure SetProgressBar(PB: TProgressBar; APos, Max: integer); |
function ProcMouseWheel(var WheelDelta: integer; var Key: Word): Boolean; |
function NegBool(var b: Boolean): Boolean; |
function NegMenuItem(Item: TMenuItem): Boolean; |
function NegCheckBox(Box: TCheckBox): Boolean; |
function RunFileSimple(const FileName: string): THandle; |
function RunFile(const FileName, Params, DefaultDir: string; ShowCmd: integer; ShowErr: Boolean = true): THandle; |
function PrintFileSimple(const FileName: string): THandle; |
function PrintFile(const FileName, Params, DefaultDir: string; ShowCmd: integer): THandle; |
function MoveListBox(L: TListBox; old, new: integer): Boolean; |
function MoveCheckListBox(L: TCheckListBox; old, new: integer): Boolean; |
function SortNum(List: TStringList; Index1, Index2: integer): integer; |
function SortDate(List: TStringList; Index1, Index2: integer): integer; |
function AddItemIfNotExist(List: TStrings; Text: string): Boolean; |
procedure GetPrinterNames(List: TStrings); |
function GetDefaultPrinterName: string; |
function SetDefaultPrinter(const PrinterName: String; SendInfoMsg: Boolean): Boolean; |
procedure SetupPrinterDlg(const PrinterName: String); |
function GetTempDirectory: string; deprecated 'use GetTempDir instead'; |
function GetTempDir: string; |
function GetSystemDir(FolderType: integer): string; |
function GetAppPath: string; deprecated 'use GetAppDir instead'; |
function GetAppDir: string; |
function SetEndOfPath(const Path: string): string; |
procedure UseFontFormatParams(AFont: TFont; Param: string); overload; |
procedure UseFontFormatParams(AFont: TFont; Param: string; var NormalStyleDefined: Boolean); overload; |
procedure UpdateAlignmentFromAlignmentDefault(var Alignment: TAlignment; AlignmentDefault: TAlignmentDefault); |
procedure UpdateFontStylesFromFontStylesDefault(var FontStyles: TFontStyles; FontStylesDefault: TFontStylesDefault); |
function IsBitSet(const AValueToCheck, ABitIndex: integer): Boolean; |
function SetBit(const AValueToAlter, ABitIndex: integer): integer; |
function ResetBit(const AValueToAlter, ABitIndex: integer): integer; |