33 questions
5 votes
1 answer
15k views
How to get elements by name in Delphi Chromium Embedded?
To get a particular DOM node embedded in the current web document from a TChromium instance, using its ID, you use ICefDomDocument.getElementById(). But how do you find elements by the NAME attribute?...
17 votes
4 answers
12k views
Delphi - How to prevent Forms/MsgBoxes to move under prior form?
Many times after the Windows 98 era we have experienced that some dialogs lose their Z-Order and move back to the prior form. For example: Dialog1.ShowModal; Dialog1.OnClickButton() : ShowMessage('...
1 vote
2 answers
6k views
Convert OleVariant to Object in Delphi
I'm working on this project where we don't have the source code for large chunks of the project, but we have the .DLL files with some information. There is a bug in the DLL files. I am able to ...
25 votes
4 answers
14k views
What is the difference between compiling and building in Delphi?
With Delphi-6 there are two options: Build and Compile. I know when I run a program it compiles only the files which have changed and uses the DCUs for those which haven't. When I click build ...
14 votes
1 answer
47k views
Indy 10 - IdSMTP.Connect raising "Could not load SSL library."
Here is my configuration: IdSMTP1.Host := 'smtp.gmail.com'; IdSMTP1.Port := 587; IdSMTP1.UseTLS := utUseExplicitTLS; IdSMTP1.IOHandler := IdSSLIOHandlerSocketOpenSSL1; IdSSLIOHandlerSocketOpenSSL1....
13 votes
9 answers
7k views
How reliable is the Random function in Delphi
I am writing a program which write statistical tests in Delphi (must be Delphi) and I've heard that the Random functionality is somewhat odd. You have to call randomize to randomize the seed of the ...
11 votes
4 answers
31k views
Convert hex str to decimal value in delphi
I've got a problem to convert a string representation of an hex value in integer value with Delphi. for example: $FC75B6A9D025CB16 give me 802829546 when i use the function: Abs(StrToInt64('$...
6 votes
2 answers
7k views
Handling of Unicode Characters using Delphi 6
I have a polling application developed in Delphi 6. It reads a file, parse the file according to specification, performs validation and uploads into database (SQL Server 2008 Express Edition) We had ...
6 votes
1 answer
10k views
How do I get screen coordinates of the DBGrid cell
I want to show popup button or fancy message (with coloured background, etc) just under right-bottom corner of particular cell of the current row. For now I only figured how to get grid coordinates: ...
2 votes
2 answers
1k views
Aquire Singleton class Instance Multithread
To get the instance of the class with Singleton pattern, I want use the following function: This is a sketch interface uses SyncObjs; type TMCriticalSection = class(TCriticalSection) private ...
0 votes
1 answer
407 views
GetFontUnicodeRanges without a window
Is there a chance to call GetFontUnicodeRanges without a window? For example, it could be a Windows service not permitted to interact with desktop. Currently I am testing this with console application:...
0 votes
1 answer
574 views
Passing nil as a parameter in place of a TComponent
I've come across some code that's throwing an exception (EIntfCasterror Cast not supported) when it passes nil to a constructor expecting a TComponent, like so: obj := SomeClass.Create(nil); The unit ...
34 votes
8 answers
21k views
What's the difference between public and published class members in Delphi?
Please could someone explain me what's the difference between public and published class members in Delphi? I tried to look at Delphi help and I understand that these members have the same visibility,...
17 votes
6 answers
32k views
How do I compile my Delphi project on the command line?
Has anyone ever managed to compile their Delphi 6 & 7 (NOT any Delphi > 7 ) projects using the command line? All the instructions I see are not very clear on what exactly needs to go where! Am ...
10 votes
6 answers
5k views
How to force Delphi compiler to display all hints and warnings
Is there a way to force the Delphi compiler to display all hints and warnings all the time? Here is the behavior that I am currently seeing in Delphi 6: Check out fresh copy of my application from ...