Questions tagged [delphi]
Delphi is a language for rapid development of native Windows, OS X and iOS applications through use of Object Oriented Pascal. The name also refers to the Delphi IDE, which is used to help edit and debug Delphi projects more efficiently.
77 questions
0votes
0answers
13views
Delphi VCL Copy-Paste Clipboard Functions for Matrix Table in VirtualTree View
I'm working on implementing copy-paste functionality for a matrix table in a Delphi VCL application. The matrix is displayed using a virtual tree view (a control that allows for dynamic data handling)....
2votes
3answers
149views
Configurable 'swapping' order of loops
The code below groups a list by either number or letter, as seen below: 1A, 1B, 2A, 2B, 3A, 3B, 4A, 4B, 5A, 5B or 1A, 2A, 3A, 4A, 5A, 1B, 2B, 3B, 4B, 5B The option is configurable by the user via ...
1vote
1answer
651views
Delphi - did I understand callbacks correctly?
I am trying to learn callbacks in Delphi (7). Could not find a complete simple tutorial, so I puzzled together a few bits here and there. This is my first attempt, of course trivial. My form contains ...
3votes
1answer
312views
Delphi function to canonicalize the capitalization in a file path
I'm building a small Delphi application where a user can input a file or directory manually by typing it or by selecting it from a dialog . Since it can be input manually, I want to ensure that I save ...
2votes
0answers
392views
Delphi TIdTCPClient connection pool in a multithread environment
I want to use TIdTCPClient to connect to Redis from a web server application made with Delphi and TWebModule. Currently on ...
2votes
0answers
85views
type in a Postcode and get the address
(I asked this Question in stackoverflow (Delphi) and they suggested that I try here. Is there a site to submit my Delphi 7 coding to? Hi I am learning how to build compound components. My latest ...
2votes
3answers
118views
Efficiently calculate the value of an arithmetic sequence
I need to calculate the value for the following function: $$f(n) = -1 + 2 - 3 + ... + -1^n$$ The time limit to calculate a given value of \$n\$ is less than 1 second. My approach does not meet that ...
3votes
1answer
768views
Basic Color class for both Delphi and Lazarus
Intro If you want to know, then about 10+ years ago, I started a journey on the (best in my country) color picker for WinXP, later Win7. Since now it is hardly compatible with Win10 and HiDPI (work in ...
4votes
0answers
123views
Animation loop for a sliding puzzle game
I'm building a "sliding puzzle" game. This is the animation code for when you click a Tile. This "loop" function is running all the time. When you click a tile, if it's available to move, I set the "...
2votes
2answers
125views
Dephi: faster way to convert a "dirty" string to a number
How can I make this code faster? the string can contain characters such as ", .?#" and possibly others. ...
0votes
1answer
591views
IsValidEmailAddress
I have created this function for Delphi 10.1 Berlin to validate an email address entered by the user: ...
1vote
1answer
277views
Generic function for loading a function from a DLL library
I am trying to write a generic function for loading a function from a DLL library. I am in no way an expert on DLLs, that is why I ask. We have discussed it first in my Stack Overflow question to ...
4votes
0answers
357views
Code efficiency check for hangman in Delphi
I recently coded a game of hangman and wanted to know, A: Are there any places it could be more efficient? B: Are there any things that are distinctly wrong with it, since I know people seem to say ...
3votes
1answer
830views
Noughts and crosses bot in Delphi
I hope someone can guide me in a way to make this code more efficient. Please explain the things you do simply because I'm no pro so more complex things I am unlikely to get. If you have issues with ...
1vote
1answer
1kviews
Enumerating RCData resources from the EXE file which has been launched
I am running Delphi XE6. I recently integrated all of my read-only language INI files into the executables. As a consequence, I need to enumerate RCData resources (and then simply filter out the ...