delphi

How do I get the command-line parameters for certain button clicks in a application?

I want to start a program using Delphi code, and "command" it to perform an action, in this case a button click. I know you can start a program using the command line, but I would need the right paramaters for the button click. How or where can I find it? ...

How to hunt a Heisenbug

Recently, we received a bug report from one of our users: something on the screen was displayed incorrectly in our software. Somehow, we could not reproduce this in our development environment (Delphi 2007). After some further study, it appears that this bug only manifests itself when "Code optimization" is turned on. Are there any peo...

Delphi - get what files are opened by an application

How can I get the list of opened files by an application, using Delphi? For example what files are opened by winword.exe ...

delete char from binary file

hi all I want to delete a char/string from a binary/text file. If I know the position of the char/string from the file, how can I delete it? Should I read the file (BlockRead), remove the char/string (with Delete(source, startPos, endPos) and then write (BlockWrite) to a new file or I can delete directly from the specified file? thanks...

Memory profiling tool for Delphi?

I set up a project and ran it, and looked at it in Process Explorer, and it turns out it's using about 5x more RAM than I would have guessed, just to start up. Now if my program's going too slowly, I hook it up to a profiler and have it tell me what's using all my cycles. Is there any similar tool I can hook it up to and have it tell m...

Delphi's TFrames not keeping their size when reloading a project?

I have a project with a lot of frames, and when I reload my project, they are resized to a width and height of 443x270, or thereabout. I do reside the frames at runtime, but I wish they would remain as I create them at design time. I use the non-embedded, classic undocked view. Anyone has any idea on how to have the frames keep their s...

How to find "fat" procedure memory usage?

While working on my code lately, I've noticed that some of the memory usage is going up significantly, and I can't see many reasons for it in my code. So I'm wondering if there are any programs, techniques, or other types of tools that can scan my code (Delphi) and estimate for me what procedures, functions, and functions will be the he...

How to pop-up the Windows context menu for a given file using Delphi?

Hi, I want to write the following procedure / function: procedure ShowSysPopup(aFile: string; x, y: integer); Which will build and show (at the coordinates x and y) the right-click shell menu which one sees in the Windows Explorer for the given file. I'm not so interested in the 'showing' part but more in how one can build such a men...

How Can I Get Embarcadero Quality Central To Do Something About My Bug Report

It's almost a year ago that I asked this question on SO: Menu Accelerator Keys Not Showing Up (Delphi 2009) The Delphi programmers here at StackOverflow were superb with their answers, and within 16 hours, I was able to conclude that this was a bug in the VCL of Delphi 2009 that was not there in Delphi 4. So at that time I reported it ...

Complete XML Schema Validation

I am looking for a tool that will tell me all of the XML Schema validation failures. All the other tools I have looked at so just tell me the first couple, and then I have to fix those before it will tell me the next errors. I realize that some errors may be dependent on other nodes being in different orders, but things like data types...

add current/selected user to a group

Hi all can anyone tell me how can I (programatically) add the current/selected user to a group (like power user, backup opetarors) any function/info/code is welcomed ...

Can't use DLL (written in C++) in Delphi: The procedure entry point could not be located

I've compiled a DLL in Visual Studio (the source code is in C++, which I barely understand). Here's a piece of Scraper.h: struct SWin { char title[512]; HWND hwnd; }; SCRAPER_API bool ScraperGetWinList(SWin winList[100]); Now I'm trying to use the above function in my Delphi application: type tWin = record title: String;...

Delphi, VirtualStringTree - rebuilding tree, restoring state (expanded nodes)

How can I restore state of nodes in VirtualStringTree (which ones were expanded) at tree rebuilding? my application uses VirtualStringTree (one of the best components EVER!). Now, what I need is to rebuild the tree each time the application is started. In most cases however the "new" tree is the same as the one built last time... or at ...

What Design Patterns do you implement in common Delphi programming?

Hello fellow programmers, As I'm a learner and user of design patterns and Delphi I would like you to ask a question which you may find subjective (Ooo just another "what's the best?"). What Design Patterns do you implement in common Delphi programming? What patterns are easier to adapt in Delphi programming? (Every language is excelle...

How to make a floating DirectX Child Window with Delphi?

I have a Delphi project and the main form is a child window of another application. The parent application (a 3D game coded in C++) has two window states, windowed and full screen. In windowed mode the Delphi form floats on top of the parent application perfectly. It can be clicked on, dragged around, no problem (using params.Style := WS...

detect Windows Explorer copy operation

Is there any way to detect whenever a copy operation starts in Windows Explorer. kind of like in SuperCopier : SuperCopier Website ? and log files involved in the operation ? and such ? I've browsed through Supercopier code and I can't find the part which deals with detecting the copy operation, as I'm not fluid in Delphi. P.S : it s...

RAD Studio 2011 ( ? )

Hi to all, is there any information available for the next version ( 2011 ?? ) of Delphi/cbuilder from Embarcadero ?. Is there some link somewhere pointing to info related to next Delphi / cbuilder , when and what it might be in ? Anything? Thanks a lot. Sebastian. ...

When and Why Should I Use TStringBuilder?

I converted my program from Delphi 4 to Delphi 2009 a year ago, mainly to make the jump to Unicode, but also to gain the benefits of all those years of Delphi improvements. My code, of course, is therefore all legacy code. It uses short strings that have now conveniently all become long Unicode strings, and I've changed all the old ANSI...

List of diagram / image editors for Delphi

I need a good diagram / image editor for a Delphi application. I need the ability to place an image in the editor, and use freely positioned balloons / tips to describe parts of the image. The result must be exported as an image. So far, I have evaluated KSDev Block Engine and TMS Diagram studio but am not completely satisfied with bot...

Delphi: Access violation after calling function from external DLL (C++)

There's a function, written in C++ and compiled as DLL, which I want to use in my Delphi application. Scraper.cpp: SCRAPER_API bool ScraperGetWinList(SWin winList[100]) { iCurrWin=0; memset(winList,0,100 * sizeof(SWin)); return EnumWindows(EnumProcTopLevelWindowList, (LPARAM) winList); } Scraper.h: #ifdef SCRAPER_EXPORTS...