delphi

Delphi 2009 Actionmanager default Imagelist

I have just started a new project, and I am using the Delphi 2009 Actionmanager component for the first time. The Actionmanager has a list of standard actions, which gives me actions such as File open / save without any coding - great stuff. Is there a standard ImageList to go with this, with the correct images for the default ImageInde...

Pass a Delphi class to a C++ function/method that expects a class with __thiscall methods.

I have some MSVC++ compiled DLL's for which I have created COM-like (lite) interfaces (abstract Delphi classes). Some of those classes have methods that need pointers to objects. These C++ methods are declared with the __thiscall calling convention (which I cannot change), which is just like __stdcall, except a this pointer is passed o...

Delphi getting property value of a member from ClassType

I am implementing a Boilerplate feature - allow users to Change descriptions of some components - like Tlabels - at run time. e.g. TFooClass = Class ( TBaseClass) Label : Tlabel; ... End; Var FooClass : TFooClass; ... At Design time, the value Label's caption property is say - 'First Name', when the application is run, there ...

Did Delphi ever get a for each loop?

Hello, I've read that Delphi was supposed to get a for each loop in Delphi 9. Did this functionality ever make it into the language? My Delphi 2009 IDE doesn't seem to recognize the for each syntax. Here's my code: procedure ProcessDirectory(p_Directory, p_Output : string); var files : TStringList; filePath : string; begi...

Set designed Tframe on some Tpanel

I am totally novice in C++ Builder. Never tried working with VCL frames. So, i have some Tform with Tpanel and two frames designed. How can i display designed frames on my forms panel? Tired searching similar examples. ...

Why the composite component fails to parent controls?

Hi, I created my own Component : TPage , which Contains Subcomponent TPaper (TPanel). The problem is, that when I put controls such as TMemo or TButton on the TPaper (which fills up nearly whole area), the controls do not load at all. see example below TPaper = class(TPanel) protected constructor Create(AOwner: TComponent);ove...

Office Word 2007 Interop - Header FieldCodes not showing up in my code, but are when viewed with Word

Hello, I'm writing an application in Delphi (have two over revisions of it written in both C# and Visual Basic, also). In my C# and Visual Basic version, I did something like the following to loop through the header/footer FieldCodes: // Supress filename, date and username field codes in headers fieldCount = WordApp.ActiveDocum...

Top modal form close in nested modal forms closes all other modal forms?

When form A is modal and it displays a second modal form B, and the modal result for B is set and B then closes, A is also closed. How can this be prevented? ...

Implicit linking vs. explicit linking of DLL in Delphi

I'm having trouble getting my dll to work when using explicit linking. Using implicit linking it works fine. Would someone google me a solution? :) No, just kidding, here's my code: This code works fine: function CountChars(_s: Pchar): integer; StdCall; external 'sample_dll.dll'; procedure TForm1.Button1Click(Sender: TObject); begin ...

Delphi Search Edit Component

Hi, I need a delphi component for Delphi 2007 win32 that have features like Google search text box. ** While User writing search key it should fill/refresh the list with values, and user can select one of them. **User can go up and down list and can select one of them. **List should contain codes and text pair, so user can select t...

Delphi - ListView or similar with owner draw button

How do I do create a listview (or similar) with a button on each line? The button needs to be able to have different text/color on each line as required. I'm sure Virtual Treeview would be perfect for this, but I'm a little lost with it. Thanks -Brad ...

TVirtualStringTree compatibility between Delphi 7 and Delphi 2010 - 'Parameter lists differ'

Hi, I've made a form containing a TVirtualStringTree that works in Delphi 7 and Delphi 2010. I notice that as I move between the two platforms I get the message '...parameter list differ..' on the tree events and that the string type is changing bewteen TWideString (D7) and string (D2010). The only trick I've found to work to suppress th...

Load two instances of the same DLL in Delphi

Here's my problem: I would like to create two separate instances of the same DLL. The following doesn't work because Handle1 and Handle2 will get the same address Handle1 := LoadLibrary('mydll.dll'); Handle2 := LoadLibrary('mydll.dll'); The following works, but I have to make a copy of the DLL and rename it to something else (wh...

Which network protocol to use for lightweight notification of remote apps?

I have this situation.... Client-initiated SOAP 1.1 communication between one server and let's say, tens of thousands of clients. Clients are external, coming in through our firewall, authenticated by certificate, https, etc.. They can be anywhere, and usually have their own firewalls, NAT routers, etc... They're truely external, not ju...

What is a good format for command line output when it is being used for further processing?

I have written a console application in Delphi that queries information from several locations. This application will be launched by another process, and the output to STDOUT will be captured by the launching process. The information I am retrieving is to be interpreted by the calling application for reporting purposes. What is the best...

Destroy object during event called by said object

Hello, I have a button. Its OnClick event calls a procedure which destroys the button, but then the "thread" wants to return to the OnClick event and I get an access violation. I'm completely stumped! ...

tfs integration with delphi 2010

We are currently upgrading from Delphi 7 to Delphi 2010. With Delphi 7 we use Source Connection to integrate Delphi 7 with TFS, but there does not look like there is going to be a Delphi 2010 version in time. Is there any other integration option out there? ...

How do you keep application logic separate from UI when UI components have built-in functionality?

I know it's important to keep user interface code separated from domain code--the application is easier to understand, maintain, change, and (sometimes) isolate bugs. But here's my mental block ... Delphi comes with components with methods that do what I want, e.g., a RichText Memo component lets me work with rich text. Other components...

Interface helpers or delegating interface parent

If I have an existing IInterface descendant implemented by a third party, and I want to add helper routines, does Delphi provide any easy way to do so without redirecting every interface method manually? That is, given an interface like so: IFoo = interface procedure Foo1; procedure Foo2; ... procedure FooN; end; Is anything ...

Is there any trade-offs by using classes objects instead of records in VirtualStringTree?

Regarding: http://stackoverflow.com/questions/2288461/delphi-virtualstringtree-classes-objects-instead-of-records Does the memory increases or something? PS: I am using Delphi 2007. ...