How to get application version number in Delphi

CK1820 
Created at Jun 15, 2012 09:32:00
Updated at Mar 09, 2024 14:10:57 
160   0   0   0  

If you need to get application version number at runtime, you can get it by calling below sample code.

function GetAppVersionStr: string;
var
  Rec: LongRec;
begin
  Rec := LongRec(GetFileVersion(ParamStr(0)));
  Result := Format('%d.%d', [Rec.Hi, Rec.Lo])
end;


Tags: Delphi imagecopyresized imagecreatefromjpeg Share on Facebook Share on X

◀ PREVIOUS
The Delphi function to get My Videos folder
▶ NEXT
How To Turn On/Off Monitor with Delphi
  Comments 0
Login for comment
SIMILAR POSTS

The Delphi function to get My Videos folder (created at Apr 29, 2011)

I want to select directory(folder) not file. How can I do that ? (created at Apr 29, 2011)

Changing the Title of a Print Dialog in Delphi (created at Apr 20, 2011)

Auto Logon Programming in Delphi (created at Dec 31, 2010)

Delphi Program can command level execution program with hidden mode (updated at Jan 15, 2024)

Thread Application Implementation in TThread (created at Apr 14, 2010)

Is there directory selection VCL component in Delphi ? (created at Sep 08, 2009)

How to launch application ? (created at Sep 08, 2009)

How to print external document ? (created at Sep 08, 2009)

Delphi API to get windows temporary directory (created at Sep 03, 2009)

Delphi API to get the current working directory (created at Sep 03, 2009)

How to resize PNG file in Delphi ? (created at Sep 03, 2009)

Get the length of arrays and a string (updated at Jan 15, 2024)

Delphi Pointer Types (created at Aug 22, 2009)

How to read/wrtie INI file in Delphi ? (created at Aug 20, 2009)

How to get file created time, modified time, and last accessed time ? (created at Aug 19, 2009)

Delphi string conversion functions - AnsiToUTF-8, UTF8Encode, ... (created at Jul 20, 2009)

When subject is crashing in TIdSMTP VCL (created at Jul 20, 2009)

How to send text/html based email in UTF-8 with TIdSMTP, TIdMessage VCL (created at Jul 20, 2009)

How to encode subject content when sending mail with TIdMessage ? (created at Jul 16, 2009)

Base64 Encoding/Decoding function for Delphi (created at Jul 16, 2009)

How to send email by TIdSMTP VCL ? (created at Jul 07, 2009)

How to return exit code such as exit() function in C/C++ ? (updated at Jan 15, 2024)

How to get parameter string ? (created at Jun 30, 2009)

Save TBitmap image to Jpeg format image in Delphi (created at Jun 25, 2009)

How to download/grap web pages or XML document at internet website in Delphi XE? (created at Jul 20, 2015)

How to get screen resolution in case of using multiple monitors ? (created at Dec 16, 2008)

How to turn off monitor ? (created at Dec 10, 2008)

Find File at certain directory in Delphi (created at Oct 10, 2008)

Good Delphi components (created at Apr 03, 2016)

OTHER POSTS IN THE SAME CATEGORY

Building a Simple DNS Server in Delphi with TTL Support (created at Mar 16, 2024)

Run PowerShell Command as Administrator in Delphi (updated at Mar 09, 2024)

Run command with Administrator permission in Delphi on Microsoft Windows (updated at Mar 09, 2024)

Delphi code to send data to web server based on POST method (updated at Mar 09, 2024)

Good Delphi components (created at Apr 03, 2016)

How to download/grap web pages or XML document at internet website in Delphi XE? (created at Jul 20, 2015)

Delphi Program can command level execution program with hidden mode (updated at Jan 15, 2024)

How To Turn On/Off Monitor with Delphi (updated at Mar 09, 2024)

The Delphi function to get My Videos folder (created at Apr 29, 2011)

Get Application Data Path on Delphi (updated at Mar 09, 2024)

I want to select directory(folder) not file. How can I do that ? (created at Apr 29, 2011)

Changing the Title of a Print Dialog in Delphi (created at Apr 20, 2011)

Auto Logon Programming in Delphi (created at Dec 31, 2010)

Thread Application Implementation in TThread (created at Apr 14, 2010)

Is there directory selection VCL component in Delphi ? (created at Sep 08, 2009)

How to launch application ? (created at Sep 08, 2009)

How to print external document ? (created at Sep 08, 2009)

Delphi API to get windows temporary directory (created at Sep 03, 2009)

Delphi API to get the current working directory (created at Sep 03, 2009)

How to resize PNG file in Delphi ? (created at Sep 03, 2009)

Get the length of arrays and a string (updated at Jan 15, 2024)

Delphi Pointer Types (created at Aug 22, 2009)

How to read/wrtie INI file in Delphi ? (created at Aug 20, 2009)

UPDATES

Creating a Pinterest-Style Card Layout with Bootstrap and Masonry (created at Apr 24, 2024)

Mastering Excel Data Importation in PHP (updated at Apr 24, 2024)

JSON format control in PHP (updated at Apr 24, 2024)

Equal Height Blocks in Bootstrap with JavaScript (created at Apr 22, 2024)

How to convert integer to text string ? (updated at Apr 22, 2024)

Checking similarity between two strings in PHP (updated at Apr 21, 2024)

Create Blob Image in HTML based on the given Text, Width and Height in the Center of the Image without saving file (updated at Apr 21, 2024)

How do I determine the client IP type (IPv4/IPv6) in PHP (updated at Apr 16, 2024)

How do I determine the client IP type in Python - IPv4 or IPv6 (updated at Apr 13, 2024)

Getting Started with PyTorch: A Beginner's Guide to Building Your First Neural Network (updated at Apr 09, 2024)

Predicting Buyer Preferences with PyTorch: A Deep Learning Approach (updated at Apr 09, 2024)

Forecasting the Weather with PyTorch: A Beginner's Guide to Temperature Prediction (created at Apr 09, 2024)

PyTorch example to Forcast Stock Price based on 10 days Dataset (created at Apr 09, 2024)

Mastering Model Persistence: Saving and Loading Trained Machine Learning Models in Python (created at Apr 08, 2024)

Harnessing the Power of Random Forest Algorithm in Python (created at Apr 08, 2024)

Understanding and Implementing K-Nearest Neighbors (KNN) Algorithm in Python (created at Apr 08, 2024)

Forecasting with Linear Regression and KNN Regression in Python (updated at Apr 07, 2024)

What is 302 Found Redirection in HTTP 1.1? (created at Apr 04, 2024)

Mastering Random Forest Regression: A Comprehensive Guide with Python Examples (updated at Apr 01, 2024)

Python Implementation of Linear Regression (updated at Apr 01, 2024)

Mastering Supervised Machine Learning with Python: A Comprehensive Guide (created at Apr 01, 2024)

Mastering AI: A Beginner's Guide to Python Programming and Beyond (created at Apr 01, 2024)

How do I create animated background for Google Meet? (updated at Mar 28, 2024)

Building a Simple DNS Server in Delphi with TTL Support (created at Mar 16, 2024)

How to force cookies, disable php sessid in URL ? (updated at Mar 16, 2024)

Implementing a Versatile DNS Server in PHP: Handling A, AAAA, CNAME, and TXT Records (updated at Mar 16, 2024)

Implementing a Versatile DNS Server in Python: Handling A, AAAA, CNAME, and TXT Records (created at Mar 16, 2024)

Building a Basic DNS Server in PHP/Python: A Beginner's Guide (updated at Mar 15, 2024)

Dynamic DNS Made Easy: Building a Python-Based Solution (created at Mar 15, 2024)

Exploring the Depths of Data Transfer: sendfile vs. kTLS (created at Mar 15, 2024)