delphi

String concatenation VS string format

What is the best approach, simple string concatenation or string.format? For instance, what is the better to use: s:=v1+' '+v2 or s:=format('%S %S',[v1,v2]) ...

Convert a DevExpress TcxFilterOperatorKind to and from a string ?

Hi! Here is a codesnippet I use to get filtertype operator from a filter in a DevExpress grid: OperatorKindToStr is used to extract operatorkind from a filter as string and store it in a xml-file. StrToOperatorKind is used to convert back a string from xml to set an operatorkind in a filter. const CUSTFILTER_FILTERITEM = 'FilterI...

Form Designer for Dummies...

A colleague of mine is doing the functional designs for the software we develop. His knowledge about Delphi, Visual Studio and other compilers is limited to having written a "Hello, World" application, which turned out to have dozens of bugs. So, technical knowledge? Not there... But not required for his function, since it's his job to c...

Callback from a C++ dll to a delphi application

Application is written in delphi 2010 and the underlying dll is a C++ dll. In ideal case, when your application is in C++; The dll makes a callback to an application when an event occurs. The callback is implemented through an interface. Application developers implements the abstract c++ class and pass the object to the dll. The dll wi...

Replacement for TList in Delphi Prism.

Hello, I am migrating an application written in Delphi 2007 to Delphi Prism, which is the best option to replace the TList class? Thanks in advance. Bye. ...

How To Read and Write Delphi 2010 RibbonApplicationMenuBar Recent Items To A File

How do you read and write RibbonApplicationMenuBar recent items to a file or Inifile? The help file is not very helpful for getting at the list of recentitem strings to save and reload the recent items. I can add items to the recent items list by Ribbon1.AddRecentItem( APathFilename ) and open the file associated with the recent item w...

Encryption library for Delphi

I'm looking for a free and up to date encryption library for Delphi 2010 that implements RSA and AES (Rijndael). I want a free library because I plan to write and publish some sample code that will use it. A Delphi 2010 version of TurboPower LockBox has been posted to the SongBeamer site, that implements both of these, but I'm concerne...

How i can declare a global method in delphi prism

Hello, How i can declare a global method in delphi prism using the __Global class? And It is recommended to use global methods? unfortunately I have not found any example. Thanks in advance. Bye. ...

Creating JScript objects using IScriptControl

Is there a better way to create objects in IScriptControl than this? Result := SC.Eval('new Date()'); I need something like this: function CreateJSObject(JSClassName: string; Params: PDispParams): OleVariant; a naive implementation would be var S: string; begin S := ''; for I := P.cArgs - 1 downto 0 do begin ...

Finding out position of a control inside TGridPanel

How I can find out the position (row and column index) of controls inside TGridPanel? I'd like to use common OnClick event for number of buttons and need to know the X,Y position of the button. I'm using Delphi 2007. ...

Sorting TListbox -- Highs and Lows

Okay, I have a TListBox that on occasion may be called upon to show 43,000 lines! I know, this hardly ever makes any sense, but there it is. Now here's the current problem: Using the built-in Sort method, with its Compare callback function, takes nearly forever, like many minutes. So I extract the strings out of the listbox into a p...

Finding elements with XPath in Delphi

Hi. I am trying to find an element in an XML document in Delphi. I have this code, but it always says 0 elements in the log: function TForm1.KannaSidu: Boolean; var Doc: IXMLDOMDocument; List: IXMLDomNodeList; begin try Doc := CreateOleObject('Microsoft.XMLDOM') as IXMLDomDocument; Doc.async:=False; Doc.load(Filename)...

Universal MP3 and WMA tag reader for Delphi

I know similar subjects have appeared in SO, but there wasn’t answer I am looking for. I need a Delphi library for reading tag information from music files. Currently I am using TJvID3v1 from JEDI library, but as far as I see, JEDI does not work with WMA files. I have found some manuals on how to implement such tag reading, but most of ...

Get list of object's methods, properties and events?

Hello When trying a new component for which there's no documentation, I need to go through its methods, properties, and events to try to figure out what it can do. Doing this through the IDE's Object Inspector is a bit tedious. Is there a utility that presents this list in a more readable format? Thank you. ...

Is Delphi 2010 ready for production use?

I am currently using Delphi 2006 a few days ago I downloaded a copy of Delphi 2010. How stable is Delphi 2010? Should I wait until the first service pack comes out before moving to this version? EDIT I have been using Delphi 2010 for a few months and it is great. The version of Rave reports (7.7BE) that comes with Delphi 2010 is ful...

Trouble with IDE and VCLZIP components

What is loaded into Delphi 2010 from a dsk file that could prevent Delphi 2010 from crashing when a project is loaded? Let me explain. It is somewhat complicated. When I installed Delphi 2010 I put it on a large USB Western Digital hard drive (R:) with only Delphi 2010, Delphi project folders and Delphi component folders on it. I cop...

CardSpace and Delphi 2007/WIN32

Very simple problem. I have a Delphi application and I want to restrict access to this by requiring users to log on using CardSpace. Basically, I need to extract the ID, name and address information from the cardspace card. The use of CardSpace is a requirement from a customer and I just want to know if: Can CardSpace be easily used f...

Does Delphi VCL provide a regular expression library ?

Is there a library in the VCL for regular expressions? If not can you recommend a good third party library. I am using Delphi 2009 ...

Steps to build Virtual Treeview in Delphi 2010

Just bought Delphi 2010 (having skipped 2009) and I am trying to get my project to compile. However, I am running in to a bunch of problems compiling Virtual Treeview 4.8.5. Can someone outline a fool proof way of compiling and installing Virtual Treeview in Delphi 2010? ...

How do I make the scrollbar's thumbtrack resize

If you open Notepad, add ten lines and resize the editor to only show nine, the thumb track (the draggable block on a scroll bar) is almost the full length of the vertical scroll bar. If you add a couple of thousand rows, the thumb track is only a few pixels high. I'd like to duplicate this bahaviour in a TCustomControl descendant where...