delphi

How can I test a Singleton class with DUnit?

Or it's better to use another Design Pattern? ...

how to open additional files into an already running application

hi all I am writing a MDI Text Editor and I was wondering how can I open all text files with my app. (If I associate te *.txt to my app I want that each time someone double-clicks on a txt file to open it in my app, in a new child window) thanks ...

Change icon for a Delphi console application

Hi, How do I change the program icon for a Delphi console application? The application settings is greyed in a console application. Bye. ...

How to use winform control VirtualTree of infralution in VCL.net?

Hi, I'm trying to use the VirtualTree of Infralution in VCL.NET, does anyone knows how to do this? In Delphi 8 was a wrapper tool, but i'm using Delphi 2007. VirtualTree http://www.infralution.com/forums.html ...

Program both as Console and GUI

Is it possible to (and if so, how do I) make a single program work both as a console application and a GUI version using Delphi 2007? What I am after is that if the program is run with the appropriate command-line options, it should function as a console program, printing output to the console using WRITELN, but if no command line argum...

Memory mapped files optional write possible?

When using memory-mapped files it seems it is either read-only, or write-only. By this I mean you can't: have one open for writing, and later decide not to save it have open open for reading, and later decide to save it Our application uses a writeable memory-mapped file to save data files, but since the user might want to exit ...

converting TForm win32 app to Win7 gadget (delphi)

What is the process of converting win32 application (a small popup window actually) to win7 gadget? Do I need to convert my exe to activex component, can I still use TForm ? it would be nice to have support for both Win7 + Vista. ...

one way communication from background exe to activex (sidebar gadget)

I need a small communicator between an application/background process and the gadget, I think its easiest to make own activex module that has just getText() and setText(). I need to pass a string once per second or so. I guess the activex object should use shared data so that another new activexobject() (created by javascript gadget pag...

integrate component

are ther any integrate parser mathematical expertion component in delphi? ...

Delphi 7 access Windows X509 Certificate Store

Hello, My questions if pretty simple: is there a simple way to access Windows X509 Certificate Store using Delphi 7? Before asking this questions I have googeled, but have not found any useful info Thank You ...

Which Third Party Components Have You Installed Into Delphi And Why?

Which third party components have you installed into Dephi and why? I'm moving from D5 Enterprise to Delphi 2010. I haven't installed 3rd party tools in the past but I did upgrade to QReports Pro and TChart Pro. I will writing database apps so lots of inserts, updates & deletes will be going on. Database queries, searches and filtering...

How to cast an PSafeArray item into its original type

Hi I am using an COM in Delphi 7 that was created in C# and one of the methods of a class return an array of an type. However, when Delphi imports it, instead of an array of that type I get an PSafeArray. How can I cast the items of that array into its base type? I've tried to use SafeArrayGetElement but I couldn't find a way of casti...

Delphi: How to modify the Library Path?

Using D7. Do you know of a better Library Path Editor than the one included in Delphi 7? ...

Outline searching

IDE: Delphi 1 16-bit (Yeah it's old, no I can't afford a newer version or the hardware needed to run it. Besides I'm just learning Delphi so it serves the purpose fine.) I've loaded a TOutline with names (to represent an address book). They're in sorted order. I want to be able to search the outline. Possible searches: the whole na...

Digitally sign token with RSA-SHA1 Base64 encryption

I am trying to interface with Google Services using AuthSub: AuthSub Authentication In the documentation it states this: The signature for the secure token. This value must be a signature made by the private key corresponding to the certificate provided during registration. It must be encoded in BASE64, and must use the SHA-1 with R...

Accessing a single file with multiple threads

I need to access a file concurrently with multiple threads. This needs to be done concurrently, without thread serialisation for performance reasons. The file in particular has been created with the 'temporary' file attribute that encourages windows to keep the file in the system cache. This means most of the time the file read wont go ...

Delphi: A generic list of generic-descendants and taking a generic as a parameter

I struggle a little with the understanding of generics and how they can and can not be used. I have a generic class TControlMediator like this: TControlMediator<C, T> = class private FMediatedComponent: C; public constructor Create(ComponentToMediate: C); function GetValue: T; virtual; abstract; procedure SetValue(Value: T); v...

What is a good multithreading book for Delphi?

Where can I get a good book on Delphi threading. Something that will suit a total newcomer to the subject. ...

any functions to create zip file of directory/file on vista with delphi 2009

I am looking for a simple method of zipping and compressing with delphi. I have already looked at the components at torry delphi:http://www.torry.net/pages.php?s=99. They all seem as though they would accomplish what I want however a few disadvantages to using them is that none of them run in delphi 2009 and are very complex which makes ...

Get BPL File Name

From within a BPL, is it possible to get its own file name? e.g. C:\foo\bar.bpl (dynamically loaded and delphi7, if it matters) ...