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.
76 questions
2
votes
3
answers
181
views
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 ...
1
vote
1
answer
676
views
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 ...
3
votes
1
answer
345
views
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 ...
2
votes
0
answers
404
views
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 ...
2
votes
0
answers
93
views
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 ...
2
votes
3
answers
141
views
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 ...
3
votes
1
answer
792
views
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 ...
4
votes
0
answers
137
views
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 "...
2
votes
2
answers
157
views
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.
...
0
votes
1
answer
617
views
IsValidEmailAddress
I have created this function for Delphi 10.1 Berlin to validate an email address entered by the user:
...
1
vote
1
answer
292
views
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 ...
4
votes
0
answers
376
views
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 ...
3
votes
1
answer
859
views
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 ...
1
vote
1
answer
1k
views
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 ...
3
votes
1
answer
3k
views
Sending a string from anonymous thread to UI with PostMessage
I am sending a string from an anonymous thread to the UI with PostMessage in the following code:
...