delphi

Can a windows dll retrieve its own filename?

So a windows exe file has access to the command string which invoked it, including its path and filename. eg. "C:\MyApp\MyApp.exe --help". But this is not so for a dll invoked via LoadLibrary. Does anyone know of a way for a dll to find out what its path and filename is? Specifically I'm interested in a Delphi solution, but I suspect ...

Delphi MDI Application and the titlebar of the MDI Children

I've got an MDI application written in Delphi 2006 which runs XP with the default theme. Is there a way of controlling the appearance of the MDI Children to avoid the large XP-style title bar on each window? I've tried setting the BorderStyle of the MDIChildren to bsSizeToolWin but they are still rendered as normal Forms. ...

What is needed to get Delphi back on top?

Delphi 2011 is on the horizon, which is the 14th release since Turbo Pascal became Delphi in 1995. Despite continued innovation it has not returned to its level of popularity before the Inprise fiasco. Many developers with Delphi backgrounds are moving to C# and many Delphi legacy applications are being rewritten in C#, despite the f...

Delphi resources for existing .NET developer.

Can anyone recommend some decent resources for a .NET developer who wishes to get a high level overview of the Delphi language? We are about acquire a small business whose main product is developed in Delphi and I am wanting to build up enough knowledge to be able to talk the talk with them. Books, websites etc all appreciated. Thanks...

Are there any "mind mapping" components for Delphi? (native VCL preferably)

I'm looking for a pre-written component (w/source) for a Delphi project that I'm working on, to generate mind-maps / concept-maps similar to these: http://en.wikipedia.org/wiki/Image:MindMeister_screenshot_OS_X.jpg http://en.wikipedia.org/wiki/Image:XMIND_2008_in_Windows_Vista.png Any ideas? ...

What is the best way to make a Delphi Application completely full screen ?

What is the best way to make a delphi application (delphi 2007 for win32 here) go completely full screen, removing the application border and covering windows task bar ? I am looking for something similar to what IE does when you hit F11. I wish this to be a run time option for the user not a design time decision by my good self. As M...

Changing CURRENT save/default directory in Delphi 2007 without using Save-As

I have a project group that contains a project I'm working on as well as some related component / packages. I prefer to have the database links active at design time, and though I know how to write the code to change database files location, I'm just using ".\data" for that in this case, for a few different reasons, mostly design-time r...

Delphi and COM: TLB and maintenance issues

In the company that i work, we develop all the GUI in C#, but the application kernel is mainly developed in Delphi 5 (for historical reasons), with a lot of components made in COM+. Related to this very specific sort of application a I two questions: Experienced guys in Delphi and/or COM, do you have any workrounds to work with the bug...

How to keep track of the references to an object?

In a world where manual memory allocation and pointers still rule (Borland Delphi) I need a general solution for what I think is a general problem: At a given moment an object can be referenced from multiple places (lists, other objects, ...). Is there a good way to keep track of all these references so that I can update them when the o...

Unit testing in Delphi - how are you doing it ?

Hi, I'm wondering how the few Delphi users here are doing unit testing, if any ? Is there anything that integrates with the IDE that you've found works well ? If not, what tools are you using and do you have or know of example mini-projects that demonstrate how it all works ? ...

Multiple form Delphi applications and dialogs

I have a Delphi 7 application that has two views of a document (e.g. a WYSIWYG HTML edit might have a WYSIWYG view and a source view - not my real application). They can be opened in separate windows, or docked into tabs in the main window. If I open a modal dialog from one of the separate forms, the main form is brought to the front, a...

TClientDataSet Aggregates specification aren't added automatically when creating an Aggregate field.

I need to create an Aggregate Field in a TClientDataSet, but as said in the docs: Choose OK. The newly defined aggregate field is automatically added to the client dataset and its Aggregates property is automatically updated to include the appropriate aggregate specification. When I add a new aggregate field, the aggregat...

How to implement Type-safe COM enumerations in Delphi ?

How could i implement Type-Safe Enumerations in Delphi in a COM scenario ? Basically, i'd like to replace a set of primitive constants of a enumeration with a set of static final object references encapsulated in a class ? . In Java, we can do something like: public final class Enum { public static final Enum ENUMITEM1 = new Enum (...

Documenting Delphi

Hi Is there a good tool for scanning a Delphi project and organising the units, forms etc. Maybe it could go down to procedure level and say output to Word or RTF. This would allow me to get a first cut documentation going for a large product. thanks Andrew ...

64bit Memory allocation

I've been asked to create a Delphi compatible dll in C++ to do simple 64bit memory management. The background is that the system in Delphi needs to allocate a lots of chunks of memory that would go well outside 32bit addressable space. The Delphi developer explained to me that he could not allocate memory with the Delphi commands availa...

What's the idiomatic way to do async socket programming in Delphi?

What is the normal way people writing network code in Delphi use Windows-style overlapped asynchronous socket I/O? Here's my prior research into this question: The Indy components seem entirely synchronous. On the other hand, while ScktComp unit does use WSAAsyncSelect, it basically only asynchronizes a BSD-style multiplexed socket app...

Visual Studio equivalent to Delphi bookmarks

I use Delphi for many years, and although I have now moved on to Visual Studio I still fondly remember numbered bookmarks (CTRL+K+1 to set bookmark 1, CRTL+Q+1 to goto bookmark 1). Is there a Visual Studio equivalent? I'm find the dumb bookmarks in VS a chore after Delphi. I want to bookmark then return to a specific place in the file. ...

What's the best Delphi book for a newbie?

I'm a web developer (PHP, Perl, some ASP.NET) with some desktop app experience (VB.NET, Python, Adobe AIR), but I'd like to learn Delphi so I can write small, Win32 apps that I'll know will work on any Windows or Linux+WINE machine. Right now I'm using Turbo Delphi (2006, freebie), but really need some kind of "Dummies book" to get star...

Best way to sort an array in delphi

Say I have an array of records which I want to sort based on one of the fields in the record. What's the best way to achieve this? TExample = record SortOrder : integer; SomethingElse : string; end; var SomeVar : array of TExample; ...

In Delphi 7, why can I assign a value to a const?

I copied some Delphi code from one project to another, and found that it doesn't compile in the new project, though it did in the old one. The code looks something like this: procedure TForm1.CalculateGP(..) const Price : money = 0; begin ... Price := 1.0; ... end; So in the new project, Delphi complains that "left side ca...