Calling a Delphi DLL from a C# .NET application

Based on responses to my post, I have created a new example that uses string buffers for the returned strings, instead of just returning PAnsiChars. Delphi DLL source: library DelphiLibrary; uses SysUtils; // Compiled using Delphi 2007. // NOTE: If your project doesn’t have version information included, you may // receive the error “The “ResolveManifestFiles” … Read more

How to make a combo box with fulltext search autocomplete support?

The following example uses the interposed class of the TComboBox component. The main difference from the original class is that the items are stored in the separate StoredItems property instead ofthe Items as usually (used because of simplicity). The StoredItems are being watched by the OnChange event and whenever you change them (for instance by … Read more

Rotate bitmap by real angle

tl;dr; Use GDI+ SetWorldTransform With WinAPI’s SetWorldTransform you can transform the space of device context: rotate, shear, offset, and scale. This is done by setting the members of a transform matrix of type XFORM. Fill its members according the documentation. procedure RotateBitmap(Bmp: TBitmap; Rads: Single; AdjustSize: Boolean; BkColor: TColor = clNone); var C: Single; S: … Read more

A standalone Delphi application that can also be installed as windows service

Totally possible. The trick is to edit the .dpr to create main form when you want to run as an application and the service form when you want to run as a service. Like this: if SvComFindCommand(‘config’) then begin //When run with the /config switch, display the configuration dialog. Forms.Application.Initialize; Forms.Application.CreateForm(TfrmConfig, frmConfig); Forms.Application.Run; end else … Read more

ORM for DELPHI win32 [closed]

Marco Cantu is a big believer in InstantObjects: Home Others include DObject: http://www.macrobject.com/en/dobject/ and tiOPF http://tiopf.sourceforge.net/Doc/overview/index.shtml You also might be interested in the G Framework: http://code.google.com/p/g-framework/