delphi-5

"Application" global variable not recognized

I work on a large project in Delphi 5. Today, after merging two branches of the app together, one of the hundreds of units, UnitMain (the main form's unit, would you guess) stopped recognizing the Application global. This is a rather bizarre problem - I could get the program to compile by defining Application: TApplication in UnitMain, ...

Can I access the string returned from a Delphi CreateProcess command?

I'm using the Win32 CreateProcess function to perform a call to an external executable. The executable returns a string. Is there a way I can capture and interrogate the returned string after calling the executable? Failing that, I might have to write out the string to a file in the executable and read that in the calling program afte...

Delphi - Class TListView not found

We have a Delphi 5 application, that is built without runtime packages, dlls or external resources (i.e. a single executable). when we install it on a clients PC we get the following error messages: Class TListView not found or Class TImage not found We have installed it on dozens of PCs before without incident, but this late...

Any gotchas moving TServerSocket app from D5 to D2007?

I've done a brief Google around and found nothing but I feel I ought to ask. I'm not really expecting there to be anything, but would rather ask a question with no answers now than ask the question when it's all going wrong and discover that EVERYONE knew about a 'gotcha'...! To make overall support/development life easier (and to bring...

Retrofitting Windows Event Log to a Delphi 5 app

I'm looking for a (fairly pain-free) means of adding some Windows Application Event-Log support to a small legacy Delphi 5 application. We just want it to log when it starts-up, shuts-down, fails to connect to a database etc. Several of the solutions/components I've seen seem to suggest that we'll need to make a resource DLL which the ...

Delphi CMExit message not sent when modal dialog is closed?

In one part of the application I'm working on, there is a form control that does validation on reception of the CMExit message, which is exactly how the Delphi documentation says to do it (this code sample is from the Delphi Help files): procedure TDBCalendar.CMExit(var Message: TWMNoParams); begin try FDataLink.UpdateRecord; ...

How to get selected cells from TDBGrid in Delphi 5

I have a DBGrid on a form and I have made multiple selections, I now need to send the selected cells (they are email addresses) to the "TO Box" of Outlook how can I do this, I will appreciate any help ( Delphi5) Thanks in advance ...

How to print TPanel contents?

I have TPanel. On this Panel there is an TImage descendant , few other panels with controls, etc. In fact, picture contains some diagram, while additional panels with labels are created during runtime to provide user with additional info. Recently I was told, that it would be nice, if it was possible to print this panel, and have it on t...

Install D5 (& third party comps) on a machine with Delphi 2007?

I've got a Delphi 2007 VM which includes a reasonably up-to-date Report Builder and Dev Express Suite. I use it for a particular project for a particular client. For that same client, I also have a D5 VM which just so happens to use a (different, older) version of Report Builder and a different (older) version of some of the Dev Express...

Create an exact copy of TPanel on Delphi5

I have a TPanel pnlMain, where several dynamic TPanels are created (and pnlMain is their Parent) according to user actions, data validations, etc. Every panel contains one colored grid full of strings. Apart from panels, there are some open source arrows components and a picture. Whole bunch of stuff. Now I want user to be able to print...

Good OS Delphi exception handling libraries?

Do you know any Open Source libraries for Delphi to serialize exceptions? I want to have a form “Exception has occurred”, so my users will be able to email error report to me. But apart from serializing exception manually, are there any open source libraries, that will serialize exception to XML or even flat file? The absolute must-be: ...

Delphi 5 calling C++ dll causing Access Violation

Here is the Delphi code calling the C++ dll... implementation {$R *.DFM} procedure CallMe(x: Integer); stdcall; external 'CppWrapper.dll'; procedure TForm1.Button1Click(Sender: TObject); begin CallMe(1); end; end. Here is the error message...(Access Violation at 00000001. Read of Address 00000001.) The CallMe procedure exec...

What should I do or don't do to avoid Delphi "push dword" bug.

I found that Delphi 5 generates invalid assembly code in specific cases. I can't understand in what cases in general. The example below produces access violation since a very strange optimization occurs. For a byte in a record or array Delphi generates push dword [...], pop ebx, mov .., bl that works correctly if there are data after thi...

Error on setting TDateTimePicker.Font.Style to italic in Delphi 5

Is it possible to set TDateTimePicker’s font to italic? I am doing it in this code var DatEdit : TDateTimePicker; begin //I know Canvas is a stupid name for TPanel DatEdit:=TDateTimePicker.Create(Canvas); DatEdit.OnEnter := CtrlInputProc; DatEdit.OnExit := CtrlExitProc; DatEdit.Enabled := false; DatEdit.Font.Style := DatE...

Delphi - TStoredProc.Close (does it empty the set?)

LEGACY ALERT - This is for Delphi 5 code. (I know it is super old. It is scheduled to be rewritten.... Some day.) I am using the BDE and the TStoredProc object. When I call Close, this normally clears my dataset. However, I am seeing weird things happen so I thought I would ask this question. If I have manually added rows to the da...

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 do not work on later versions. In the meantime however people need to continue work on i...

Delphi 2009 Upgrade Question...

Hi, i bought yesterday an upgrade to Delphi 2009 Pro. Now i have the problem that i have a version of Delphi 5 Enterprise, but it's registered, but the account has been lost. Is there a way to get the Delphi 5 version to be moved to my account, so that i can register the Delphi 2009 Pro. Otherwise i also got a Delphi 3 Pro laying arou...

Delphi 5 IDE command-line return codes

I am attempting to automate some legacy Delphi 5 builds with an MSBuild script, and am having trouble capturing errors. Thinking there was some issue with the MSBuild passing, I also tried a batch file and am still receiving back passes (0) when the build should fail (1). %2 is the path to delphi and %3 is the project name. REM delphi...

Install a .bpk into Borland C++ Builder from the command line

I am attempting to install a .bpk package into the Borland C++ Builder 5 IDE from the command line. I am sure that this is possible, as we have some third party components that manage to do so, but I have not been able to figure out the required steps. Any pointers are appreciated! ...

Delphi 5 - StrToFloat results differntly on WinXP and Win2K

hi! 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); end; procedure TForm1.Button2Click(Sender: TObject); var s2: string; f2: dou...