delphi

Flatten a TSpeedButton?

Is there anyway to force a TSpeedButton to be redrawn flat? When using a touch screen monitor, the mouse does not move out of the button, so the raised border stays on screen, even when you click on a different button. ...

Can you overload the assignment operator for Delphi records?

I have a record that contains a dynamic array. It is normal that when you assign one array variable to another, in fact only the pointer to that array is assigned. This means that when you do that, both the variables point to the same array until you change the size of one of them. Therefore, when I want to assign a separate copy of an a...

Get/Set TShellListView Path/Folder as String (Not Using .Root)

I want to set the path for a TShellListView to display a directory of files using Delphi 2007. I can initially use TShellListView.Root to set the root path like this and it shows the directory I want: View := TShellListView.Create(Self); // ... View.Root := 'C:\Windows'; But if the user navigates away from that directory using backsp...

.NET equivalent of Delphi's forceDirectory

Does anyone know what's the .NET/C# equivalent of Delphi's forceDirectory function ? For who don't know delphi, forceDirectory creates all the directories in a given path if it doesn't exist. ...

How to call Microchip PIC USB DLL with Delphi 2009

Not a question, just a statement to help anyone else who might spend hours getting the Microchip PIC USB DLL to work properly with Unicode. It expects several strings, and although these are simple PAnsiChar, getting the right combination of DLL call convention took me ages. There are a lot of people on the 'net using Delphi (non-Unicod...

How can I create objects with reference using instantobjects framework programmaticaly in Delphi code

I am a experimenting with instantobjects. I have two simple classes tband and tcountry both are defined as stored. tband has a properts named tcountry referencing the tcountry class/table. (country is the lookup table). When creating a new band I want the user to be able to select the country in the form from a list/combo and then save t...

List of free dbexpress drivers for Delphi

Anyone knows/has a comprehensive list of free open source dbexpress drivers? ...

snapshot image from PDF document

I want to make a snapshot image from an arbitrary page (i.e. not necessarily the first) in a PDF document. Any free tools for this? I'm using Delphi. TIA Steven ...

What are the best practices for database development with Delphi?

How can I use the RAD way productively (reusing code). Any samples, existing libraries, basic crud generators? How can I design the OOP way? Which design patterns to use for connection, abstracting different engines/db access layers (bde-dbexpress-ado), basic CRUD operations. ...

Why is it bad practice to call an eventhandler from code?

Say you have a menu item and a button that do the same task. Why is it bad practice to put the code for the task into one control's action event and then make a call to that event from the other control? Delphi allows this as does vb6 but realbasic doesn't and says you should put the code into a method that is then called by both the me...

Dynamic GUI creation using configuration files

Is is possible to create GUI for a Delphi application using an configuration pattern from an xml etc... file. Any frameworks exist for such an operation. It is easy with scripting like languages but can we simulate this behaviour in Delphi? I need free library. ...

Using ChangeDisplaySettingsEx in Delphi to set primary monitor

I'm trying to use ChangeDisplaySettingsEx in Delphi 7 to set a specific monitor as Primary. In Windows.pas, it is defined as function ChangeDisplaySettingsEx(lpszDeviceName: PChar; var lpDevMode: TDeviceMode; wnd: HWND; dwFlags: DWORD; lParam: Pointer): Longint; stdcall; In MSDN, the documentation for ChangeDisplaySettingsEx...

Conditional compilation based on a compiler directive in Delphi 2009

Is there a way in Delphi 2009 to have a section of code conditionally compiled based on a compiler directive. Specifically, I'd like to have code in place that is only included if the range-check compiler directive is turned on. Something like this: {$ifdef RANGECHECKINGISON} [do range checking code here] {$endif} ...

Frame behavior in Delphi application issue

I have an application that uses a frame extensively and needs to hide/show certain buttons depending on which form is active at the time. In order to keep the buttons neat and organized appropriately, I have put them on panels and show or hide the panels as needed for each form. My problem is when each form is initially created, the pa...

Design Patterns for Delphi 2009

I'm looking for design patterns (GOF, but others would be welcome too) for Delphi 2009. There are some very good and classic articles about Design Patterns in Delphi: http://www.obsof.com/delphi_tips/pattern.html, by James Heyworth (1996) http://blogs.teamb.com/joannacarter/, by Joanna Carter (until 2004) Additionally, the newer Del...

Delphi 7 keeps using old outdated form

Changed, updated, form is not used even though uses and project settings seem fine, old form files removed from disk. Is this a bug in the IDE? I may just delete the form and copy it into another unit with a new name. ...

Load Jpg/Gif/Bitmap and convert to Bitmap

Hi, I have to load an image from an XML file. There is no information in the XML file about whether the image is JPG/GIF/BMP. After loading the image, I need to convert it to Bitmap. Does anyone have any clue how to convert images to Bitmap without knowing the actual file format? I'm using Delphi 2007/2009 Thank you. ...

Read/Parse/Modify MS Word document in Delphi without Word Automation

Hi, Does anyone know any good library (free or commercial) for Delphi that can read/parse/modify MS Word documents (preferably with Word 2007 support) without MS Word OLE Automation? I've found some for .Net, but none for Delphi. For example, here are two .Net/Java libraries - Aspose, Word.net I don't want to add .Net dependencies in m...

Uninitialized memory in C++Builder / Delphi

Are uninitialized variables in Delphi guaranteed to have any particular value on the stack? on the heap? Since C++Builder generally follows Delphi's design, are uninitialized variables in C++Builder guaranteed to have any particular value on the stack? on the heap, for member variables of classes derived from TObject? on the heap, ...

Light-weight database engine for Delphi 1?

Hi - I'm looking for a light-weight database engine for Delphi 1 (don't ask, it's a long story). Delphi 1 is 16-bit. The engine should compile into the EXE. SQL would be nice, but not mandatory. Any info would be great. Thanks, Carl ...