Questions tagged [delphi-5]

Delphi 5 is a specific version of Delphi. It was released in August 1999. Use this tag for issues related to development in Delphi, version 5.

Delphi 5 is a specific version of Delphi.

Delphi 5 codename is Argus.

Delphi 5 was preceded by Delphi 4 and succeeded by Delphi 6.

395 questions
52
votes
3 answers

Delphi: What is Application.Handle?

What is TApplication.Handle? Where does it come from? Why does it exist? And most importantly: why do all forms have it as their parent window handle? The Delphi help says: TApplication.Handle Provides access to the window handle of the main form…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
41
votes
4 answers

Delphi: Understanding constructors

i'm looking to understand virtual override overload reintroduce when applied to object constructors. Every time i randomly add keywords until the compiler shuts up - and (after 12 years of developing with Delphi) i'd rather know what i'm doing,…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
36
votes
5 answers

wsMaximized forms do not appear maximized

Setting a form to WindowState = wsMaximized will sometimes cause the form to be maximized but not: Long-time bug: this is a question I first asked in the Borland newsgroups in 2003: Accepted fix for WindowState = wsMaximized? and then again in…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
22
votes
8 answers

Converting a string to TDateTime based on an arbitrary format

Is there any way in Delphi 5 to convert a string to a TDateTime where you can specify the actual format to use? I'm working on a jobprocessor, which accepts tasks from various workstations. The tasks have a range of parameters, some of which are…
Willem van Rumpt
  • 6,490
  • 2
  • 32
  • 44
22
votes
7 answers

Delphi: All constants are constant, but some are more constant than others?

Consider: const clHotlight: TColor = $00FF9933; clLink = clHotLight; //alias of clHotlight [Error] file.pas: Constant expression expected and the alternate wording that works: const clHotlight = TColor($00FF9933); clLink =…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
18
votes
2 answers

Invalid floating point operation calling Trunc()

I'm getting a (repeatable) floating point exception when i try to Trunc() a Real value. e.g.: Trunc(1470724508.0318); In reality the actual code is more complex: ns: Real; v: Int64; ns :=…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
17
votes
1 answer

What can my 32-bit app be doing that consumes gigabytes of physical RAM?

A co-worker mentioned to me a few months ago that one of our internal Delphi applications seems to be taking up 8 GB of RAM. I told him: That's not possible A 32-bit application only has a 32-bit virtual address space. Even if there was a memory…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
15
votes
3 answers

Changing component class at run-time on demand

My Question is similar to the idea here: Replacing a component class in delphi. But I need to change a specific component(s) class on demand. Here is some pseudo demo code: unit Unit1; TForm1 = class(TForm) ImageList1: TImageList; ImageList2:…
kobik
  • 21,001
  • 4
  • 61
  • 121
15
votes
2 answers

How to convert float or currency to a localized string?

In Delphi1, using FloatToStrF or CurrToStrF will automatically use the DecimalSeparator character to represent a decimal mark. Unfortunately DecimalSeparator is declared in SysUtils as Char1,2: var DecimalSeparator: Char; While the…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
12
votes
6 answers

Delphi: How to hide ancestor constructors?

Update: gutted the question with a simpler example, that isn't answered by the originally accepted answer Given the following class, and its ancestor: TComputer = class(TObject) public constructor Create(Teapot: string=''); end; TCellPhone =…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
12
votes
2 answers

Delphi: How delegate interface implementation to child object?

i have an object which delegates implementation of a particularly complex interface to a child object. This is exactly i think is the job of TAggregatedObject. The "child" object maintains a weak reference to its "controller", and all QueryInterface…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
12
votes
2 answers

Why is a Currency variable treated as a constant with FillChar in Delphi?

The following code should compile and does compile with many other types. However, the compiler reports a "Constant object cannot be passed as var parameter" error - despite the variable quite obviously being a variable. program…
Disillusioned
  • 14,635
  • 3
  • 43
  • 77
12
votes
5 answers

Can Delphi 5 generate a .PDB file that VS can use?

We've got this large application written in Delphi 5, and development is ongoing to this day. There is research going on into migrating to newer versions, but so far there is no success, as some 3rd party components have not been updated in ages and…
Vilx-
  • 104,512
  • 87
  • 279
  • 422
11
votes
2 answers

How to debug division by zero exception in Internet Explorer?

i am hosting Internet Explorer in a Windows application. i can scroll down to the bottom of the document. When i then try to scroll back up i get a division by zero exception: When i scroll using Page Up the crash appears to happen at the call to…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
10
votes
3 answers

DUnit: How to run tests?

How do i run TestCase's from the IDE? i created a new project, with a single, simple, form: unit Unit1; interface uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) private …
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
1
2 3
26 27