Delphi’s holy source of knowledge!

  • How can I convert long filename to DOS filename in Delphi

    To convert a long filename to a DOS filename (also known as an 8.3 filename) in Delphi, you can use the GetShortPathName function from the Windows API. This function takes a long filename as input and returns the corresponding short (8.3) filename. Here is an example of how to use the GetShortPathName function to convert…

  • How can I use named pipes in Delphi

    In Delphi, you can use named pipes to communicate between processes on the same computer or between processes on different computers across a network. To create a named pipe in Delphi, you can use the CreateNamedPipe function from the Windows API. Here is an example of how to use this function to create a named…

  • How do I get exif info in Delphi

    To get EXIF information from an image file in Delphi, you can use the TExifData class from the Vcl.Imaging.Jpeg unit of the Delphi VCL. This class provides properties and methods that allow you to read and write EXIF metadata from and to JPEG image files. Here is an example of how you can use the…

  • How can I create TTreeView in runtime in Delphi

    To create a TTreeView component in Delphi at runtime, you can use the TTreeView class and the Create method of the component’s parent container. Here is an example of how you might create a TTreeView component at runtime and add it to a form: var TreeView1: TTreeView; begin TreeView1 := TTreeView.Create(Form1); TreeView1.Parent := Form1; TreeView1.Align…

  • How do I get digital signature info in Delphi

    To get the digital signature information of a Delphi application, you can use the TWinCertificate class from the Winapi.WinTrust unit of the Delphi RTL. This class provides properties and methods that allow you to access the digital signature of the application, including the signature timestamp, subject name, and issuer name. Here is an example of…

  • How do I get application info in Delphi

    To get information about the currently running application in Delphi, you can use the ParamStr, ExeName, and GetModuleFileName functions from the System.SysUtils unit of the Delphi RTL. These functions provide an easy way to access various details about the application, such as the command line arguments, executable name, and file path. Here is an example…

  • How can I create TTimer in runtime in Delphi

    To create a TTimer component in Delphi at runtime, you can use the TTimer class and the Create method of the component’s parent container. Here is an example of how you might create a TTimer component at runtime and add it to a form: var Timer1: TTimer; begin Timer1 := TTimer.Create(Form1); Timer1.Parent := Form1; Timer1.Interval…

  • How do I get battery info in Delphi

    How do I get battery info in Delphi To get battery information in Delphi, you can use the TBattery class from the System.Win.Battery unit of the Delphi RTL. This class provides properties and methods that allow you to access various details about the battery installed on your computer, such as the battery level, charging state,…

  • How can I create TGridPanelLayout in runtime in Delphi

    To create a TGridPanelLayout component in Delphi at runtime, you can use the TGridPanelLayout class and the Create method of the component’s parent container. Here is an example of how you might create a TGridPanelLayout component at runtime and add it to a form: var GridPanel: TGridPanelLayout; begin GridPanel := TGridPanelLayout.Create(Form1); GridPanel.Parent := Form1; GridPanel.Align…