delphi

replace characters in a file (faster method)

We often replace non-desirable characters in a file with another "good" character. The interface is: procedure cleanfileASCII2(vfilename: string; vgood: integer; voutfilename: string); To replace all non-desirables with a space we might call, cleanfileASCII2(original.txt, 32 , cleaned.txt) The problem is that this takes a rather lon...

DeCAL and Delphi 2009

Have someone tried out DeCAL in Delphi 2009? I'm thinking about upgrading from 2007, but my code is quite dependent on DeCAL... ...

How can my program tell if Delphi is running?

I've heard that some custom component authors use an RTL routine that checks to see if Delphi is running in order to set up shareware restrictions. Does anyone know what this routine is? Checking obvious names like "DelphiRunning" or "IsDelphiRunning" doesn't turn up anything useful. ...

Is there a function like PHP's vardump in Delphi?

I've given up on the Delphi 7 debugger and am pretty much relying on outputdebugstrings. Is there a standard function I can call to get the contents of an object as a string like the debugger would if I set a breakpoint? ...

Where is the url of the WSDL xml specification in a Delphi 7 web service?

This question is non-sense. The difficulty was due to a bug in the software. I'm trying to access a webservice using SoapUI. The webservice is developed in Delphi 7. I can call the published functions with the url http://server/my.dll/soap/IDataMod. A html representation of the WSDL file can be accessed with a web browser in the url h...

Delphi: Prompt for UAC elevation when needed

We need to change some settings to the HKEY_LOCAL_MACHINE at runtime. Is it possible to prompt for uac elevation if needed at runtime, or do I have to launch a second elevated process to do 'the dirty work'? ...

Receiving complex javascript values through external interface

I'm trying to receive and potentially send complex values through TWebBrowser (using TEmbeddedWB) with the provided external object. For example; in javascript I would try to use the exposed method with an array as a parameter: var test = [123, 'abc']; external.someFunction(test); //Or something more complex var complexObject = { som...

x86 code generator framework for Delphi

Has anyone come across a framework or library for Delphi to simplify the generation of x86 code? I am not looking for an assembler, but rather a framework that abstracts the code generation process above the low level bits and bytes. Ideally I would like to build on top of an existing library or framework rather than hardcode the logic o...

How can I cast an object to a generic?

I'm trying to cast a returned base object to it's specific generic type. The code below should work I think but generates an internal compiler error, is there another way to do this? type TPersistGeneric<T> = class private type TPointer = ^T; public class function Init : T; end; class function TPersistGeneric<T>.In...

How do I print a partially transparent image to a PDF Canvas using Delphi?

My program needs to output a (fairly complex) form to the printer, including several images. I’m currently doing this using Delphi (2006)’s Printer.Canvas, after selecting a PDF printer (PDF995). This works like a treat. However, I’m now running into a problem: there’s one partially transparent image that needs to be placed on top of ...

printing to pdf

The existing system has many reports . Using a free pdf printer like dopdf or cutepdf the user can open the report , choose the pdf printer , type in the filename and save the report as a pdf file.This seems a bit tedious It would be nice to have the report directly saved as a pdf file just on click of a button. Unfortunately the report...

How in a Delphi dxDBGrid can I change the color of a single row?

Basically a client wants to change the color of a single row in a Delphi dxDBGrid. There isn't a rows property like there is columns. Any ideas? ...

What patterns to use to build layers for delphi win 32 application

I want to develop mysql database application using dbexpress to develop from scratch or work with existing databases. To create reusable layers what patterns-components should I use. I want the app to be scalable to n-tier easily. Tried google search for ready frameworks but I found nothing much informative (some lack documentation, some...

How to group constant strings together in Delphi

I application that uses strings for different status an item can be during its life. ie OPEN, ACTIVE, CLOSED, DELETE, and so on, at the moment they are all hard coded into code like so MyVar := 'OPEN'; I am working on changing this as it can be a maintenance problem, so I want to change them all to a constants, I was going to do it...

Orpheus for Delphi 2009

Hello. I am a user of Orpheus. There is nothing better for table handlin,f.ex. I have downloaded your version for D2009. How do you get it work for You with all the CHARs in there, and without using H- for the strings ? ...

How do I return all values from a stored procedure?

Forgive my naivety, but I am new to using Delphi with databases (which may seem odd to some). I have setup a connection to my database (MSSQL) using a TADOConnection. I am using TADOStoredProc to access my stored procedure. My stored procedure returns 2 columns, a column full of server names, and a 2nd column full of users on the serve...

Rave Report that comes with Delphi 2006

There is a software which is using BDE for its database activities. The database is very awkwardly designed. I have to build a few custom reports that will use the data generated by this software. I have a need to skip a few records based on a few conditions. Like for example if Field4 and Field5 = 0 then that record should not be pr...

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...

How can Virtual Treeview control be made to always scroll by lines?

The Virtual Treeview scrolls vertically by pixels, unlike the way the standard Delphi grids, TListView and TTreeView (or most of the other such controls that I am aware of) scroll by line and keep a full line visible at the top of the control at all times. When I use the cursor keys to navigate, then depending on direction either the fir...

creating a gif animated file in delphi 2009?

gif := TgifImage.Create; gif.Width := 100; gif.Height := 100; gif.AnimationSpeed := 500; gif.Animate := true; gif.add(image1.Picture.Bitmap); gif.add(image2.Picture.Bitmap); gif.add(image3.Picture.Bitmap); gif.SaveToFile('gif.gif'); This loops just once and the speed is not 500? How to make it loop and set the speed? ...