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
4
votes
1 answer

How to generate a GUID version 1 in Delphi?

Is there a way to generate GUID v1 (time-based) in Delphi 5? I found this function... unit ComObj; function CreateClassID: string; But I'm not sure if it generates a time-based GUID. Also I know about this... SysUtils.CreateGUID(newGUID); ...…
Denis Lolik
  • 299
  • 1
  • 4
  • 11
4
votes
1 answer

Is this FastMM4 Invalid Pointer Exception a bug in FastMM for Delphi 5?

In Delphi 5, with FastMM active, the call to FreeMem in the following minimum-reproducible code triggers an Invalid Pointer Exception: program Project1; {$APPTYPE CONSOLE} uses FastMM4, SysUtils, Windows; procedure Main; var token:…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
4
votes
2 answers

Delphi: Construction not calling overridden virtual constructor

i have an example descendant of TBitmap: TMyBitmap = class(TBitmap) public constructor Create; override; end; constructor TMyBitmap.Create; begin inherited; Beep; end; At run-time i construct one of these TMyBitmap objects, load an image…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
4
votes
4 answers

Use Delphi5 in Delphi XE environment

Is it possible to compile a Delphi5 project in the new XE IDE without any migration? If've been using Delphi5 IDE for quite a while now and, to be honest, it is old, unfriendly and unflexible. I tried out XE and was impressed, however I am not…
simonescu
  • 462
  • 5
  • 17
4
votes
1 answer

Delphi 5 cast type to evaluated type causes Invalid typecast error

I need to convert a Variant to TNotifyEvent, but can't. As the image shows I use GetPropValue to get the OnClick property of a TMenuItem. I must compare this to another TNotifyEvent, so I must convert it also to TNotifyEvent. In runtime this is…
NemoPeti
  • 79
  • 1
  • 7
4
votes
4 answers

Delphi: How to remove subclasses in reverse order?

Mike Lischke's TThemeServices subclasses Application.Handle, so that it can receive broadcast notifications from Windows (i.e. WM_THEMECHANGED) when theming changes. It subclasses the Application object's window: FWindowHandle :=…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
4
votes
2 answers

How to handle PByte pointer operations in D5/D7 (Operator not applicable to this operand type)

I'm trying to port DDetours lib to Delphi 5/7. The lines that wont compile have this pattern: procedure Decode_J(PInst: PInstruction; Size: Byte); var Value: Int64; VA: PByte; begin ... VA := PInst^.VirtualAddr + (PInst^.NextInst -…
zig
  • 4,524
  • 1
  • 24
  • 68
4
votes
1 answer

Delphi editor. Tabs instead Spaces

I use Delphi 5 and I have one interesting question... If you press Enter key when cursor is at the string's end Delphi IDE automatically aligns cursor position at the new line to the first word at the previous line. But space between begin of new…
user1581016
  • 61
  • 1
  • 8
4
votes
1 answer

Delphi 5 - StrToFloat results differntly on WinXP and Win2K

I have this weird problem that a convert of a string on my machine and a production server gets different results eg: procedure TForm1.Button1Click(Sender: TObject); var s1: string; f1: double; begin s1 := '1.234'; f1 := StrToFloat(s1);…
macf00bar
  • 673
  • 1
  • 14
  • 32
4
votes
2 answers

How to pause Windows shutdown

I need to mute/un-mute the sound card at startup and shutdown. I have found some code to do the work, but often Windows slams through the shutdown and the sound never gets muted. Can someone please tell me how to pause the shutdown long enough for…
user2175495
4
votes
2 answers

Cannot add objects to GlobalInterfaceTable during ADO async callback

i am using the follow test code to add an object to the GlobalInterfaceTable: function TForm1.AddSomethingToGit(): DWORD; var unk: IUnknown; cookie: DWORD; git: IGlobalInterfaceTable; begin unk := TCounter.Create; if FGit = nil…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
4
votes
6 answers

How do I make my Delphi 5 app display password "blobs"?

Pretty simple one, but I can't find the answer. I'm building an app in Delphi 5 Enterprise, and want my app to use the new bold black dot in a password field instead of an asterisk. How can I do this?
Drarok
  • 3,612
  • 2
  • 31
  • 48
4
votes
3 answers

How to fix Delphi XE3 migration errors?

I am migrating my Delphi 5 application to Delphi XE3. I am getting some erros while compiling it. Can someone please help me to resolve these. Thanks for help in advance. I am not able to find defination of function OemToChar in XE3. When I…
Nalu
  • 1,107
  • 4
  • 20
  • 43
4
votes
1 answer

TScrollBox with customized flat border color and width?

I'm trying to create a TScrollBox with flat border instead of the ugly "Ctl3D" one. Here is what I have tried, yet the border is not visible: type TScrollBox = class(Forms.TScrollBox) private procedure WMNCPaint(var Message: TWMNCPaint);…
ZigiZ
  • 2,480
  • 4
  • 25
  • 41
4
votes
1 answer

Intersection of two strings/ sets

As coming from python I'm looking for something equivalent to this python code (sets) in delphi5: >>> x = set("Hello") >>> x set(['H', 'e', 'l', 'o']) >>> y = set("Hallo") >>> y set(['a', 'H', 'l', 'o']) >>> x.intersection(y) set(['H', 'l', 'o'])
Daniel Ozean
  • 516
  • 1
  • 6
  • 16