delphi

How to retrieve cpu usage per process

Hi All, There is a PerformanceCounter in .net platform, which can retrieve the cpu usage of every single process. Is there any similar solution in delphi? Note that the names of all processes are already available. ...

Access violation when calling external function (C++) from Delphi application

I've an external DLL written in C++. The piece below declares a struct type and a function, which, being given a pointer, fills a variable of this type: enum LimitType { NoLimit, PotLimit, FixedLimit }; struct SScraperState { char title[512]; unsigned int card_common[5]; unsigned int card_player[10][2]; unsigned int ca...

OnClick event firing speed for components

I was using two TButton components on a form that functioned as Plus and Minus. When clicked they would add or subtract from an integer which would then be displayed on a TLabel. This functioned as desired where the speed at which I would click would fire the OnClick event without fault. I have replaced the buttons with PNGButton comp...

TWebBrowser and the Tab key

When using Delphi 2007 and the TWebBrowser control is embedded in an ActiveX control (ActiveForm), the tab key does not work. What is the fix for this? ...

Deleting the row of a Table in Delphi

I have already added the table, I want some particular row to delete, anyone can help me ...

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

Printing on citrix server

We are using Delphi 7 to develop database apps with advantage as a backend. Our system is usually installed on the windows server with the pcs acting as terminals. All the settings and database are on the server. we are having problems running our software on Citrix servers. In particular printing seems to be an issue. Both in select...

How to check the "Z-position" of form in a MDI application?

Hello. I have created MDI application in Delphi. Lets assume that I have a bunch of MDIChild forms in my application which are visible on the screen. I would like to perform a loop on those forms and check in what order each of the forms is displayed on the screen. For example if I have 3 MDICHild forms: FormA, FormB, FormC and For...

Why does my program stop crashing if I call malloc instead of GetMem?

I am calling a C DLL from a Delphi 2009 application and I keep getting errors when memory allocated by GetMem or AllocMem is passed to the DLL. The only way around I could avoid these errors was by using malloc from msvcrt.dll. What is malloc doing that the built-in memory routines aren't, and how can I get the built-in ones to work? I r...

Is WSDL sort order relevant?

I'm refactoring an existing C# .NET Web Service that is consumed by existing Delphi 2006 (non-.NET) clients. I don't want to rebuild/redeploy the clients. My goal is to keep the WSDL identical so that the proxy classes won't change. I used a tool (Regionerate) to region and sort the methods/properties based on our current standards. Thi...

Using LMDWebHTTPGet downloads the file to the Temporary Internet Files directory only

Using LMDWebHTTPGet1 from LMD Innovative downloads the file to the Temporary Internet Files directory only I would like to get it into a directory of my choice ...

Delphi printing primer

I need to add printing capabilities to an app and I have been looking around for information about printing. Logical/physical sizes, dpi, font scaling, etc, lots to digest since I never programmed printing into any app before. Are there any sites that would offer a primer on the topics of page sizes, margins and all the other elements r...

Delphi: How to use line breaks in a ini file?

Is it possible to have line breaks in an ini file using Delphi? I have a string value that I'd like to use, but it needs to have the ability for line breaks. I don't need any other formatting of the text. How can I do this? ...

Help with sending number to Excel 2007 from Delphi 2010 as a string.

I'm sending a number to Excel 2007 as a string (Cell.Value := '2,5') using late binding. The actual code is more like: var CellVal: OLEVariant; ... CellVal := FloatToStr(2.5); // Regionally formatted. Cell.Value := CellVal; On my Excel 97 version, this value will be formatted as "General" by default and will be seen as a number. A ...

How to find the actual width of grid component with scrollbar in Delphi

I have a grid component (DBGrid) which has lots of columns on it. Because of large number of columns, a scrollbar was created, and thus some part of grid remains hidden. I need to find out what is the real width of DBGrid, including the part which is not shown due to scroll bar. But Width property gives only the width of the component it...

Delphi: How to start application with elevated status and wait for it to terminate?

I'm trying to start another application from my program with elevated rights, and wait for it to terminate before continuing. I've tried several different solutions on the web, but I can't find one that works exactly right. The code below is the closest I have to working right. It runs the app with elevated privileges and waits for ...

How to determine Delphi Application Version

Want to obtain Delphi Application build # and post into title bar ...

Do Generics Mess Up Interface Name Mapping?

Basically, I want a class to be able to implement two different versions of the same generic interface. Consider this code type // a generic interface ITest<T> = interface ['{6901FE04-8FCC-4181-9E92-85B73264B5DA}'] function Val: T; end; // a class that purports to implement two different types of that interface TTe...

What is this 1055 Delphi Error and is it Important?

I am using a FindFile routine to search through all files in a directory. The original code was freely available from Latium Software. It runs the FindFile is a separate Thread. It has always worked fine, and still continues to work fine. But since I upgraded from Delphi 4 to Delphi 2009, it now gives a Warning: W1055: Published caused...

How to automate perl script in Delphi?

Currently, I am working in a delphi application. I need to run perl script from the delphi application. To be more clear, manually we are executing the perl script in unix window. Now I need to automate the execution of that perl script from the application. I tried using ShellExecute: ShellExecute(Handle, 'open', PChar('C:\loaderperl...