delphi

Delphi Printing Techniques

Where can I find a good resource for adding print capabilities to my program? I found this page: http://efg2.com/Lab/Library/Delphi/Printing/index.html but it hasn't been updated in 5 years, and I'd like to know if, with Delphi 2009, StretchDIBits is still preferred to StretchDrawMap, how to best support pagination, preview, etc. To da...

Arrays as result type and input for functions

in delphi7 i have a function that i need to return a array as a result type b "function createsbox(key:tkey):array[0..255] of byte;" this is not allowed it is expecting a "identifyer expected but array found" is the error throw up. seems to work fine if i declare a record type of array but it seems pointless to do this for one function....

Can specific Delphi hints be disabled?

In Delphi, you can use compiler directives to disable specific warnings, such as {$WARN USE_BEFORE_DEF OFF} But when I tried to do that with a specific hint, whose underscore_style_name I got out of the helpfile, the compiler said it doesn't know what {$HINT} is. So is there any way to do this? ...

How can I add an icon to an OCX made with Delphi so that it is visible in VB?

I made an OCX with Delphi 2007. Now my customer claims that there is no icon in his VB when he installs this OCX. How can I add such an icon to my OCX? ...

Best database for small applications and tools

What is the best database for small applications and tools? I used paradox, moved to SQL Server, now I use Blackfish. But are there other small and free databases for small applications and tools. Thanks ...

Blackfish SQL management tools

I started to use Blackfish, but I missed having a good and evolved manager. Is there something already? To help us manage the database and its tables? Thanks ...

How to get list of units in a Delphi Compiled Package (.dcp file)

Is there a way to list what units/classes are in a Delphi compiled package? ...

Want to read a file to a TStringList

Hi! Yes I want to read a simple a logfile into a TStringList and that is easy done with LoadFromFile. But the problem is that the file can be already opened by another program at the same time so an exception may appear. I have tried to use: FileMode := fmShareCompat; But it won't work. I have also tried to use: fFilePath := fPathL...

Value padded with spaces when displayed in dbaware textfield

Hi, I'm using ADO-components to connect to an access database. In a column defined as text with width 50, dataaware textfields always displays 50 characters even when the actual string value contains less characters. The value gets padded with spaces, and if the textfield is not wide enough, it looks like it is empty. Anyone got any cl...

Delphi 2009 COM/ActiveX Type Library support stability

Referring to TLB and maintenance issues ... My question to people (often) using the new COM/ActiveX type library support in Delphi 2009: How stable is the implementation? Especially, I'm interested in: adding/deleting classes, changing GUIDs, renaming methods/properties, reordering methods/properties, huge type libraries (50+ classes),...

How to get localised day names in Delphi?

I'm using standard Delphi constants DayMonday, etc and I want to convert them to localized strings (eg "Lundi"). Is there a simple RTL or VCL call for this? ...

Finding closed contours in a graph

Hi, I have graph and somehow I need to find all closed contours in graph that doesn't contains any other edges of the graph. I was searching google but only gives me charts :) Is there any library or if you know name of such algorithm. thx ...

schema validation with msxml in delphi

Hi, I'm trying to validate an XML file against the schema's it references. (Using Delphi and MSXML2_TLB.) The (relevant part of the) code looks something like this: procedure TfrmMain.ValidateXMLFile; var xml: IXMLDOMDocument2; err: IXMLDOMParseError; schemas: IXMLDOMSchemaCollection; begin xml := ComsDOMDocument.Crea...

Code snippets for Delphi?

Is there a good code snippets application for Delphi or general purpose with IDE integration? I would like to store Code, queries, notes, etc.. Thanks ...

Is it possible to have unit names added to each call to a function in a different unit?

One of the problems I often run into, is that I will include 'Windows' in my uses clause, and then I will later add 'JwaWinBase' for some specific calls. However, many of the functions in the 'Windows' unit are the same as in JwaWinBase, and I start getting errors in my main unit, all over the place, until I fix all my calls by pre-pen...

INNO Setup: How to implement file update based on different versions of the application

I have an application written in Delphi that has several versions that contain binaries and database (MDB) with catalog data. During the product life cycle fixes/enhancements are either in database file or in some binary files. Version are preserved in Registry. Users might have different versions of the program when new patch is ava...

Customizing a TListBox to resemble an Outlook list

Hey all, Please down vote me if this is not appropriate, but I'm desperate to the point of pulling my hair out looking for this link. This is really a last resort. Recently I browsed to a blog (at least I think it was) that had a very detailed description on how to modify a TListBox to have a multi-line look resembling some of the entr...

File MD5 checksum

In this question is mentioned the wcrypt2. What I need is simply calculate the MD5 of a file. It would be perfect if I could calculate it without having to save it because it is a downloaded file in stream format. I would like to have the most straightforward way to do that. Thanks! ...

In Delphi: How to skip sections of code while debugging?

I often accidently step into code that I'm not interested in while debugging in Delphi. Let's start by saying that I know that you can step over with F8, and that you can run to a certain line with f4. Example: function TMyClass.DoStuff():Integer; begin // do some stuff bla(); end; procedure TMyClass.Foo() begin if DoStuff()=0 ...

Is it possible to write extensions to Delphi's debugger?

I know there's an API for creating extensions to Delphi. I use the GExperts package and various JVCL experts frequently. But I've never seen any extensions to the debugger. It would be very nice, for example, to be able to register viewers for various objects instead of having to examine them in the Inspector. (A form with an image c...