delphi-5

Delphi-5 single-file storage solution?

Hi! Is there a Delphi-5 solution to easily integrate single-file storage into existing code? I would like to have files like Java *.jar or Openoffice document files which are zipped/compressed files and folders but with their own file extension. Edit: I know some ZIP capable components but in a nutshell I want to access files within th...

Delphi QuickReports: Band order to achieve detail-child-child-child banding?

i need to create a QuickReport in Delphi 5 that is laid out as: +================ | Report Header +================ +========================================= | Detail Band (auto-stretching, repeats) . +========================================= | Child band (fixed-size) +====================================== | Child ban...

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 (window) of the application. property Handle: HWND; Description ...

Size and modified date of delphi compiled executable in being changed automatically

I do compile the delphi source code(such as ABC.dpr) on delphi 5 compiler. after the successful compilation, i put this executalbe(say ABC.EXE with size 200300 byte) at different machine(i have only full access control to R/W, others just can read/get the files) for operation/for other user access. form last one year i observed that siz...

Delphi: How to avoid EIntOverflow underflow when subtracting?

Microsoft already says, in the documentation for GetTickCount, that you could never compare tick counts to check if an interval has passed. e.g.: Incorrect (pseudo-code): DWORD endTime = GetTickCount + 10000; //10 s from now ... if (GetTickCount > endTime) break; The above code is bad because it is suceptable to rollover of the ...

Delphi: How do i use $OVERFLOWCHECKS OFF to disable overflow checks?

i have bit of code that causes an underflow: var t1, t2, delta: DWORD: begin t1 := 0xffffff00; t2 := 0x00000037; delta := (t2 - t1); The subtraction itself does generate an overflow (underflow), but i don't want Delphi to throw an EIntOverflow exception. So i try disabling the generation of overflow checking code by disa...

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 public end; var Form1: TForm1; implementation {$R *.DFM} end. Now i'll add a...

Delphi: How to set the default project in a project group?

i have two projects in a project group: ProjectA ProjectB Whenever i open the ProjectGroup.bpg in Delphi, it always starts with the 2nd project as the active one: ProjectA ProjectB And every time i have to flip it to the the "real" project: ProjectA ProjectB How can i make ProjectA the default project that opens with the proj...

Delphi: Any StringReplaceW or WideStringReplace functions out there?

Are there any wide-string manipulation implementations out there? function WideUpperCase(const S: WideString): WideString; function WidePos(Substr: WideString; S: WideString): Integer; function StringReplaceW(const S, OldPattern, NewPattern: WideString; Flags: TReplaceFlags): WideString; etc ...

Delphi SampleProfiler: How is this code calling into ntdll.dll?

i profiled a portion of my application using the Delphi Sampling Profiler. Like most people, i see a majority of the time spent inside ntdll.dll. Note: i turned on the options to ignore Application.Idle time, and calls from System.pas. So it isn't inside ntdll because the application is idle: After multiple runs, multiple...

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 = clHotLight; //alias of clHotlight Explain. Then consider: const AdministratorGUID: TGUI...

Copy Delphi Profile

My computer crashed recently. We have a Delphi app that takes a lot of work to get running. One of my co-workers has it all installed still. Is there a way to copy the stuff stored in the palette? And the library paths? I am using Delphi 5 (I know it is very very very old) ...

Delphi Path Variables

Hey Everyone, I've got what I'm hoping is a simple question. In the Delphi IDE, the path to the Delphi installation is specified as $(DELPHI). I am wondering if there is a way to create my own path indicators, such as $(MY_LIBRARY) or something similar. I thought $(DELPHI) was specified as an environment variable, but apparently not....

Delphi: How to respond to WM_SettingChange/WM_WinIniChange?

i need to know when my application recieves a WM_SETTINGCHANGE message (formerly known as WM_WININICHANGE). Problem is that the message pump in TApplication sends it down a black hole (default handler) before i can get a chance to see it: procedure TApplication.WndProc(var Message: TMessage); ... begin Message.Result := 0; for I...

read unicode output of console application

I've console app. written in Delphi 2010. It's output is Unicode supported. (I used UTF8Encode and SetConsoleOutputCP(CP_UTF8) for this). When I run the program from command prompt it works fine. Now I want to read the output from another program which was created in Delphi 5. I use this method. But I've problems with unicode characters....

Delphi: Fast(er) widestring concatenation

i have a function who's job is to convert an ADO Recordset into html: class function RecordsetToHtml(const rs: _Recordset): WideString; And the guts of the function involves a lot of wide string concatenation: while not rs.EOF do begin Result := Result+CRLF+ '<TR>'; for i := 0 to rs.Fields.Count-1 do ...

Delphi: How to get the address of an event variable?

How do i get the address of the variable holding an event handler? e.g. TExample = class(TObject) private FOnChange: TNotifyEvent; end; i want the address of the FOnChange private member, event handler, variable. Why? i'm trying to figure out who is overwriting my FOnChange handler variable with junk. i am stepping through c...

either BOF or EOF is True, or the current record has been deleted

This error showed when I tried to select on an empty table in MS SQL Server 2005: "either BOF or EOF is True, or the current record has been deleted". I have used TADOConnection and TADODataSet in Delphi 5 to connect and retrieve data from the database. Conn := TADOConnection.Create(nil); DataSet := TADODataSet.Create(nil); Conn....

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 requests are passed back to the parent. This maintains the rule that IUnknown is always...

Is there a Delphi 5 component that can handle .png files

Is there a Delphi 5 component that can handle .png files? ...