Click here to Skip to main content
15,888,313 members
Everything / Programming Languages / Delphi

Delphi

Delphi

Great Reads

by Chad Z. Hower aka Kudzu
Delphi has some big gotchas with interfaces. Learn how to bypass them.
by ADMGNS
An alternative method to Catmull-Rom, Chaikin or Bezier curve smoothing methods
by Issam Ali
How to pass native (Delphi) callback pointer to a .net COM assembly
by Denis Murashov
In the article I describe the possibilities of standard Delphi DFM-serialization mechanism. I start from the basics and then try to cover more complex situations.

Latest Articles

by ADMGNS
A new method for 2D polyline simplification and also smoothing that alternative to Douglas-Peucker and curvature-based simplification algorithms
by ADMGNS
Very simple, noise-based color visual cryptography for images
by Max Kleiner
We use a Command Line Interface with OpenWeatherMap (PyOWM) to make it easier to use the OpenWeatherMap API in Python.
by ADMGNS
An alternative method to Catmull-Rom, Chaikin or Bezier curve smoothing methods

All Articles

Sort by Updated

Delphi 

23 Jul 2023 by Moseur
Hello Dear All,I am facing a problem with convert delphi code to vb.net... any body help me to get the solution please... please check the code belowm_arTxBfx:Array [0..255] of Byte; //Output Bufferm_arRxBfx:Array [0..255] of Byte; //Input...
27 Apr 2023 by Francin Okumbe
Everytime I click on my enter key on a program it goes to the next codes line instead of creating a new one on its own What I have tried: I tried using YouTube to help but it didn't work,I searched the internet but got nothing and I tried...
27 Apr 2023 by OriginalGriff
Make sure you have INSERT turned on - if you don't, it overwrites the newline at the EOL with a new, fresh, exactly-the-same one.
13 Oct 2022 by Chanice Grant
I want to hide the string grid until called apon by a button. There is a property for StringGrid.Visible but it doesn't do anything What I have tried: procedure TfrmMarvelM.FormCreate(Sender: TObject); // Form create begin ...
28 Sep 2022 by Moharram
hi I want to implement Matlab ismember function in C++ or Delphi, but the result is more time consuming than Matlab result! is there any idea? thanks What I have tried: As I said, the Matlab output is more faster than my implementation in...
23 Sep 2022 by merano99
After multiple timings with 64 bit release code, I get times between 3us and 4us for the example. I would be interested to know if the C++ solution takes longer and secondly how long Matlab takes. Here is my test program call with the...
28 Aug 2022 by wedagedara
Hi all,Am new to delphi.I have installed delphi and and when i press enter key in a middle of a code, it dose not insert a new line. instead, courser is going to the next line of the code.How to resolve it?Thank you
6 Aug 2022 by ADMGNS
A new method for 2D polyline simplification and also smoothing that alternative to Douglas-Peucker and curvature-based simplification algorithms
23 Jul 2022 by Winston_D
I am trying to make a multiforms application by having only the main form created on start up and creating each new additional form dynamically as needed by creating that form object, using it as a modal and once that form's purpose is complete, it is freed from memory after it is closed. Only...
23 Jul 2022 by Paul UK 15715833
I was getting the same error. Took ages to resolve. At some point, I had accidentally set the form property I was going to call modally to Enabled=False, setting back to Enabled=True fixed the issue
20 Apr 2022 by Patrice T
Quote: i am still new to programming and i do not understand how to do this task First step : find documentation about this topic and read it. Then solve the problem by hand with sample datasets. Choose bigger datasets as you progress. This...
20 Apr 2022 by Member 15608247
The chromatic number of an undirected graph is the minimal number colors in which it is possible to color the vertices of the graph in such a way that the vertices connected by an edge the tops were painted in different colors. Determine the...
19 Apr 2022 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
13 Apr 2022 by avianrand
I've done this many times in vb.net and thought I had it working in Delphi but I'm stuck. I'm using Delphi 10.2. I'm reading a PDF file into a memory stream and then converting it to a byte array so I can store it in an MS SQL file table. I...
13 Apr 2022 by avianrand
Well never mind I guess. On a whim I decided to just use TBytes and the whole solution works now.
15 Mar 2022 by JerryMallett
I'm a Delphi Dabbler Using Delphi XE8 and a TListView This has probably been asked before but none of the answers I've seen helped. I have a list of websites. 2 columns. i.e SHORTNAME URL SLACK www.slack.com ZOOM www.zoom.com etc. I...
15 Mar 2022 by Maciej Los
I think you've overcomplicated this... If you want to add only url address from currently selected item, use something like this: var ci : Integer; //later ci := ListViewURL.ItemIndex; Memo1.Lines.Add(ListViewURL.Items[ci].SubItems[1].Text);
17 Jan 2022 by Member 9439045
Hello This function is written using Pascal software. Someone can guide what this function does? Thanks .. procedure int2Hex(intnum:integer; var Bytes:Tsb8); var b,b1,b2,b3,b4,b5,b6,b7,b8:byte; n:integer; begin n:= intnum; b:=n; b8:=b...
17 Jan 2022 by CPallini
public static byte [] getNibbles(UInt32 ui32) { const int Nibbles = 8; byte [] b = new byte[Nibbles]; for ( int n=0; n>= 4; } return b; }
17 Jan 2022 by OriginalGriff
All it does is mask and shift values: Look up the AND and shr operators and it's pretty obvious: Pascal - Bit Operators[^]
26 Dec 2021 by 0x01AA
Try this: var OldRowCount: integer; OldRowCount:= sgdDisplay.RowCount; sgdDisplay.RowCount:= sgdDisplay.FixedRows; sgdDisplay.RowCount:= OldRowCount; I hope it helps.
26 Dec 2021 by Mickyle Govender
I would like to clear a string grid when a click on a certain button.Without Changing the properties off the stringgird What I have tried: procedure TfrmMain.pnlNewClick(Sender: TObject); var i: Integer; begin for i := 0 to...
25 Oct 2021 by ADMGNS
Very simple, noise-based color visual cryptography for images
20 Oct 2021 by User 15364063
Assuming you have ListBox1.MultiSelect equals false and are interested only in the currently clicked item, then... Sorry I only know the c++ syntax, but I think should be easy for you to abstract my mixed 'if' example below ;) if...
20 Oct 2021 by Mickyle Govender
Hi, I would like to click on a item in a listbox and then have the item displayed in a richedit. Thank You What I have tried: procedure TForm1.Button1Click(Sender: TObject); var sItem:string; begin sItem:=ListBox1.Items[0];...
2 Sep 2021 by bazzabahuloo
I managed to get this working for me by making a change in the stream reader thread for Audio when video is playing at anything other than normal speed. I am not sure this is the correct place, but it seems to work well at both high and low...
1 Sep 2021 by bazzabahuloo
Hi I have an AVPlayer written in Delphi using the FFMPEG libraries. This basically implements a video player as per FFPLAY but under Delphi. I want to add variable speed video playback to this player, which is easy on the video side as you...
12 Jul 2021 by Max Kleiner
We use a Command Line Interface with OpenWeatherMap (PyOWM) to make it easier to use the OpenWeatherMap API in Python.
30 Apr 2021 by ADMGNS
An alternative method to Catmull-Rom, Chaikin or Bezier curve smoothing methods
18 Apr 2021 by Richard MacCutchan
I suggest you go back to your course notes, or find a decent tutorial on Delphi. Searching for entries in a file means reading each line and comparing two values. In general it is better to read all the entries into a list or array and do in...
28 Jan 2021 by Member 13174280
add wincodec on uses, solve the problem
15 Jan 2021 by OriginalGriff
We are more than willing to help those that are stuck: but that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us...
14 Oct 2020 by Member 14965669
the problem should display the first 10 numbers of a fibonacci What I have tried: unit Numbers; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms,...
14 Oct 2020 by CPallini
Let me see if there is a place where... Fibonacci sequence - Rosetta Code[^].
8 Sep 2020 by Sandeep Mewara
Hi Vincent, There was a database issue during weekend[^] and few faced issue like you (including me. Your Article is safe and sound. Just clear your browser cache and you will be able to see it. Thanks.
8 Sep 2020 by Vincent Radio
there is an error "404" (Spoon not found) on my Article: VRCalc++ Object Oriented Scripting Language :: Vincent Radio {Adrix.NT} can you help me ? thanks in advance best regards What I have tried: i tried to open my Article: VRCalc++ Object...
8 Sep 2020 by Maciej Los
A proper place to post such of content is here: Bugs and Suggestions[^]
20 Jul 2020 by KarstenK
You have two main options: use some graphical output of the pdf and apply some OCR library or use some professional pdf-library to parse the pdf file. Here is an example for a pdf library. Both ways arent easy and need some professional skills...
20 Jul 2020 by OriginalGriff
We aren't a "code conversion" service, and a solution written in C# is unlikely to "port" to Delphi easily, or to produce good code at the end. Instead, you should use the C# app as a specification for producing a new Delphi app from scratch. ...
12 Jul 2020 by Member 13901246
I am developing mobile app in FMX where i need Popupmenu but it is showing disable in ToolPalette i cant use it but in VCL its enabled in ToolPalette and can use it. I just want to know that firemonkey supports Popupmenu or my installation having...
11 Jul 2020 by Vivaan
I want to implement a delphi project i made to my PC/Laptop startup or by using a code or command in my project or other way, open to anything What I have tried: Not anything yet ,want to be open minded and want some advice
11 Jul 2020 by Patrice T
Quote: I want to implement a delphi project No matter the language used, a project endup as an executable, an .exe, just excel.exe, outlook.exe, notepad.exe .... Quote: I want to implement a delphi project i made to my PC/Laptop startup The...
11 Jul 2020 by Richard MacCutchan
See startup add - Google Search[^].
16 May 2020 by gerhardlouis
am a Delphi beginner and are having a problem saving a TimeEdit value to a field that is an integer.The OnGetText procedure works but the OnSetText procedure is not updating the integer field in the database.This is what i have tried so far What...
26 Apr 2020 by RickZeeland
In addition to Griffs advice, a well known obfuscator is Dotfuscator[^] and here are some alternatives: obfuscators-for-net-code[^] However, no obfuscator is perfect, and my experience with Dotfuscator is that using reflection will most of the...
26 Apr 2020 by HasCode
How do I Prevent (OR make it More Hard) unauthorize decoding my Source code in .Net ? And if there are successful tools to Obscure managed Assembles Code , are they as effective as other Programming Languages Native Compilers when build my...
25 Apr 2020 by OriginalGriff
Three things: 1) Obfuscators are available for .NET to render source code pretty much unreadable, or at least very hard to work out. 2) Who says you can't produce .NET apps in native code? Microsoft doesn't: Compiling Apps with .NET Native |...
21 Apr 2020 by Yuksel YILDIRIM
Draw Multi Parametrik Shapes in 2D
11 Feb 2020 by Member 9634058
I have a Delphi program which uses dbexpress to connect to a Firebird database. When I run it on my computer within IDE workks fine. When I place the executable in a sepatare folder with the dbx4fb.dll, which is how I would like to deploy it, it...
1 Dec 2019 by n_tar
Hi all ; i need a source Code of windows FTP server; can work via internet; writen in delphi or C# What I have tried: Hi all ; i need a source Code of windows FTP server; can work via internet; writen in delphi or C#
1 Dec 2019 by OriginalGriff
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here... A very quick search gave over 22,000,000 hits, and the top one was here: Advanced FTP Server[^] In future, please try to do at least basic research yourself, and not waste...
31 Oct 2019 by Member 14640310
[code] procedure CurStepChanged(CurStep: TSetupStep); var fileName : string; begin // Called at the end of setup if CurStep = ssPostInstall then begin // create the directory and file name fileName := ExpandConstant('{pf}\{#MyAppPublisher}\{#MyAppName}\c3deditor'); ...
31 Oct 2019 by Nirali R shah
Hello, Anyone knows how to create and write batch file in inno setup or Edit batch file in inno setup?
23 Oct 2019 by Lev37
I'm calling native code dll (delphi) procedure(parameterless) from asp.net app and getting 'Access violation reading location' exception from iisexpress.exe for that [name].dll. Code works perfectly fine in Windows forms app. delphi dll native code: procedure test() stdcall; begin end;...
19 Sep 2019 by iDebD
Hi, I have a TStringGrid; When am writing in the grid, it is showing ????? ????? instead of showing و ویکیپیڈیا .The string which I am setting in TStringGrid is in Unicode, as if I can show it via messagebox;Following code setting unicode string:with frmhook.sg do begin if...
19 Sep 2019 by Member 14597783
Remember to check the "font" being used in the TStringGrid. Example: 'MS Sans Serif' does not work!
22 Jul 2019 by Member 13174280
Fixed (almost, still a problem with 5 Mb files - eg: 4.987.904 should go smoothly on MEDIUMBLOB instead Lost Connection during query... to understand, already with 2.7 Mb files you has the exception). in MySql { TINYBLOB : maximum length of 255 bytes BLOB : maximum length of...
22 Jul 2019 by Member 13174280
MySQL 8 FireDac Components (FDQuery + FDPhyMySqlLink) Table with two field a BLOB and a TINYBLOB The image is 7384 byte When execute the query the error is : [Firedac][Phys][MySql] data too long for column immagine at row 1 from the MySqlWordBench the operation on Field Blob /TinyBlob...
15 Jul 2019 by ZanTK
Hi, I'm creating ActionMainMenuBar with Categories dynamically and everything working fine BUT as ActionMainMenuBar align is alBottom when press button with categories they show up below ActionMainMenuBar. It will always try show them below if enough space. Is there any way to set categories...
9 Jul 2019 by Member 14150748
Greetings! I got a silly question, for I'd like to get some aid. I'm practicing the call of Web Services from Delphi7. I'm testing it with a WS made in C# 2010. That is what I got so far: This is the Web Service in C#: public class Service1 : System.Web.Services.WebService { ...
9 Jul 2019 by Member 14150748
Solved. Needed to add a line in Service1.pas Original: initialization InvRegistry.RegisterInterface(TypeInfo(Service1Soap), 'http://tempuri.org/', 'utf-8'); InvRegistry.RegisterDefaultSOAPAction(TypeInfo(Service1Soap), 'http://tempuri.org/%operationName%'); end. New: initialization ...
27 Jun 2019 by Member 14514860
hi i face a problem with my codes i use Delphi. i compiled my code but when i insert my test data in all my fields after switch between tabs of program, the all data are cleared. this issue occurred for my Win 7 and Win 10 does not. in the other words, content of some current records are...
27 Jun 2019 by OriginalGriff
We can't help you with this: it needs your code (which we don't have) , data (which we also don't have access to), and it needs your code running to try and find out what is going on (which we really, really can't do!) So, it's going to be up to you. Fortunately, you have a tool available to...
20 Jun 2019 by Member 14150748
Greetings. It's me again. Been trying to solve this thing since almost a month ago. Hope you could give me a hand: I installed Delphi 7, because I need to work in a project for a client. The program is already made by someone else, just gonna need to add new features. It uses third party dlls...
20 Jun 2019 by Member 14150748
Finally solved. A dll was missing. That one is installed by another application made by the same people who did the one I'm working on. Not sure which one is, I'll try to find out later. We found out about that error because when my boss was working over an empty virtual machine (XP) he...
18 Jun 2019 by Member 14150748
I made a small project in C# to test the dll using System; using AETK_LIB; //
17 Jun 2019 by CHill60
Have a look at the SysInternals suite of tools Sysinternals Suite - Windows Sysinternals | Microsoft Docs[^]. I think the one you want is ProcMon - you will be able to tell what the COM object is trying to access and work out exactly what is missing. Also ensure that you are using the right...
2 Jun 2019 by jsc42
Given the caveats in Solutions 1 and 2 above, you can easily get the serial no using MS-DOS. Run a Shell() and collect the stdout using a command like dir c:\. 2>nul: | Find "Volume Serial Number" The result will look like Volume Serial Number is D078-97C2
2 Jun 2019 by mzandi
i want protect of my application .so i read serial number hard drive and compare. the application has good result in mode administrator user but it has bad result in mode standard user. i wrote my application with c#.but for read serial number hard i used of a dll file that i wrote with...
2 Jun 2019 by Dave Kreskowiak
Again, you're existing code isn't going to work because it makes very bad assumptions about how the data is laid out in WMI and cann't reliably return the "boot drive". Also, again, you're making the assumption that every drive even has a serial number. That's not the case. How about trying to...
2 Jun 2019 by RickZeeland
See answer here: c# - Serial number of Hard Disk or Hard Drive - Stack Overflow[^]
28 Apr 2019 by Maciej Los
The error message is self-explanatory... Quote: Library has unsupported architetture[x64]. required[x86] As is stated here: Mysql configuration in Delphi 10.3 - Delphi Language - Programming Languages - IDERA Community[^]... Quote: If you use a 64-bit SQL server, the client DLLs will also be...
28 Apr 2019 by Member 13174280
I have tested on Win32 target platform and win64 The Win10 is 64 bit and MySQL 8 64bit FDConnection FDPhysMySQLDriverLink VedorLib C:\Program Files\MySQL\MySQL Server 8.0\lib\libmysql.dll [FIREDAC][Phys][MySQL] autentication PlugIn caching_sha2_password: cannot be loaded vendor library ...
8 Apr 2019 by Bulog
The problem is purely mathematic because they are the dominant combinatorics and probability. It is possible to solve the problem without knowing programming, but it is much easier to solve it by programming. In the following 40 byte group, there are 3 pairs of the same bytes: 248, 195, 38,...
8 Apr 2019 by CPallini
I would try this way: for each found pair (starting at index i) choose a random number r and swap the item at index i with the item at (i+r) (with wrap around) unless such item is itself equal to the pair members. In such an infortunate event try with (i+r+1), (i+r+2) ..., until you find a...
31 Mar 2019 by Aek-Tiesto
Thank you Gerry for the solution I'll give it a try. But what if I want to search for Bx that correspond to Ax that I type ???
31 Mar 2019 by Aek-Tiesto
Dear programmers, I was looking in the internet for an idea on how to create a software or even if there is any existing regarding my issue, but it ended up on this forum Asking for it!! hope I'm in the right place. without further ado let get to my request. I am working in a company where...
31 Mar 2019 by Gerry Schmitz
How to Use Excel to Make a Queue | Chron.com[^]
28 Feb 2019 by fisadmaster
The solution has been to change the technique from events shared by multiple instances in the same way to the use of the technique with TMethod and TExecute from the child forms to the parents. With this technique you can pass the handle of the parent form and the name of the method to be...
28 Feb 2019 by fisadmaster
The scenario is: I have a parent form that creates a child form, in order to communicate between them, a object of the custom event type is created in the parent. The handel of the parent form is passed as a param to the event create procedure. In the child form a custom event type property of...
2 Feb 2019 by CHill60
You are adding extra items instead of passing the stuff as columns. See this example SwissDelphiCenter.ch : ...show Columns in a TListBox using Tabulators of different widths?[^] Once you have set up your tabulators you should be adding your data like this:...
1 Feb 2019 by grantfullen
I have a table CREATE TABLE [main]( [ID] INTEGER PRIMARY KEY AUTOINCREMENT, [Name] TEXT, [Address] VARCHAR, [Phone] VARCHAR, [E-Mail] VARCHAR, [Vin] INTEGER, [Year] VARCHAR, [Make] VARCHAR, [Model] VARCHAR, [Job Hours] FLOAT, [Pictures]...
1 Feb 2019 by grantfullen
Thanks for your help. I do not need to add columns to the list box. I need to add all the information from my database e to to the listbox So no columns in the list box. Just the data . This is a android app so the listbox will scroll.
18 Dec 2018 by User 10574164
procedure TForm1.FormCreate(Sender: TObject); function ReadVerInfo(const fn: string; var Desc: string; const lv: integer = 0; const ky: string = ''): string; var VerHandle, VerSize : DWORD; ...
18 Dec 2018 by avianrand
I'm on Delphi RAD Studio 10.2 How do you get the information from the settings in Project > Options > Version Info? I'm talking about the KEYS. Things like "LegalCopyright", "FileDescription", and "Comments" from that? These are stored in the dbproj file but I need to know how to get those key...
3 Nov 2018 by SarahPara
HI everyone i would really appreciate it if you could help me with this problem so i have a huge problem . i need to use the data stored in a combo box from a form which it is stored in to be used in another form. basically im making a roadtrip app at a grade 10 level where on the first form...
3 Nov 2018 by Richard MacCutchan
The same way you pass any information between classes. Create a method in the second form (or an alternative constructor) that takes as its parameter(s) the information that the first form gets from the combobox. See Transferring information between two forms, Part 1: Parent to Child[^].
22 Aug 2018 by Jochen Arndt
You just have to know about the SQL syntax. As already mentioned by digimanus you can use AND within WHERE clauses. But you should use parametrised queries to avoid SQL injection - Wikipedia[^] when the data has been entered by users. Such allow also passing data by value instead of string...
22 Aug 2018 by rezki_z
HI i have this code its work fine when i search a number inside column I want the same code when i search a name in column and a date inside different column thinks procedure TForm1.sEdit1Change(Sender: TObject); var a :integer; begin IF sEdit1.Text '' then begin...
21 Jul 2018 by ThatsAlok
Let's explore Flutter Grid view and MediaQuery
20 Jul 2018 by Peter Turtle
The methods (procedures / functions) without the "class" specifier are normal methods that are a part of any INSTANCE of a class, whereas those with the "class" specifier are methods of the class itself, and not of an INSTANCE of the class.
20 Jul 2018 by stensrbr
I am having difficulties understanding the difference between the following (similar) procedure definitions. Also I'm wondering how to determine when and why to use the 2nd definition. #1 - Standard routine definition type TFigure = class public function Supports(Operation:...
20 Jul 2018 by rezki_z
Hi this is my code and I don't know where is the problem so help me please to fix it thanks What I have tried: procedure TForm1.Button1Click(Sender: TObject); begin ADODataSet1.Close; ADODataSet1.CommandText...
20 Jul 2018 by Peter Turtle
Your CommandText property should be a complete SQL statement, not just a filter. Either use parameters in the full SQL statement, or use your existing code as a filter.
12 Jul 2018 by Chad Z. Hower aka Kudzu
Delphi has some big gotchas with interfaces. Learn how to bypass them.
12 Jul 2018 by Chad Z. Hower aka Kudzu
There are dozens of more things I'd like to see in Delphi, but here I will cover the ones that are easy to implement, yet provide large gains.