delphi

Anyone has sample code to load an xml using OMNIXML

I am looking for some actual working sample code to read an XML using the plain OmniXml (or OmniXmlUtils) unit. I don't want to use the TOmniXMLWriter class , as explained elsewhere , but want to load an xml file using plain Delphi code. I searched the OmniXml site but the samples there are as good as non-existing. Thanks in advance. ...

Multiple keyboard hooks in .NET and Delphi

Hi, I have an application with both .NET and Delphi components I register to a keyboard hook (with SetWindowsHookEx) in both components. I first register in .NET, and later in Delphi. The problem is, the hook delegate in Delphi is called before the hook delegate in .NET. According to MSDN, the hook chain is just a list, and as I under...

Need to create a compiled delphi app that can make a separate compiled app

I need to make an app that will let users select some options, click a button, and a separate compiled app is created. Is this possible? I am using delphi 7 and 2010. Thanks for the replies. Here is a little more info. It would have to be a graphical app and create a graphical app. What I want is the user to fire up 'App A' (I orig...

Which dbExpress ServerCharSet do I need for utf8 data in MySQL 5?

We tried ServerCharSet=utf8 and ServerCharSet=UTF8, based on information found in newsgroups - but still, special characters / Umlauts do not appear correctly in the client data. We use Delphi 2009 and the built-in dbExpress driver. Field data is retrieved using AsWideString. ...

How can I use Delphi to test if a Directory is writeable?

Currently I use this function, based on JCL code, which works fine: function IsDirectoryWriteable(const AName: string): Boolean; var FileName: PWideChar; H: THandle; begin FileName := PWideChar(IncludeTrailingPathDelimiter(AName) + 'chk.tmp'); H := CreateFile(FileName, GENERIC_READ or GENERIC_WRITE, 0, nil, CREATE_NEW, FILE...

Problem with using transaction in delphi when calling to MS SQL SERVER 2008 R2 ?

I need to call some Stored Procedures from Delphi and because they are related I have to use transactions. But It always returns an error when called : 'Transaction cannot have multiple recordsets with this cursor type. Change the cursor type ,commit the transaction, or close one of the recordsets.' And this error only occurs for...

Need simple example to use TAdoConnection to connect to MySql default databasse

Final answer: This was not a Delphi problem, just configuration. I use Xampp to provide the MySql server. C:\xampp\mysql\bin>mysql.exe --version mysql.exe Ver 14.14 Distrib 5.1.41, for Win32 (ia32) so, the correct connection string is 'Driver={MySQL ODBC 5.1 Driver};Server=localhost;Database=mysql;User=root; Password=;Option=3...

Is it possible to have Delphi auto-generate event-support code for an imported OLE/COM type library?

I'm trying to generate _TLB import units for Outlook 2003, 2007 and 2010 (and also other OLE servers) analogous to the ones bundled with Delphi for Outlook 2000 and 2002. However, I couldn't get the type library importer to also generate the code for capturing events from the OLE servers that is found in the bundled units. The option to ...

Delphi extract string between to 2 tags

How would I go about extracting text between 2 html tags using delphi? Here is an example string. blah blah blah<tag>text I want to keep</tag>blah blah blah and I want to extract this part of it. <tag>text I want to keep</tag> (basically removing all the blah blah blah garbage that comes before and after the <tag> & </tag> strings ...

How can I select multiple individual cells of a string grid?

I am looking for a string grid that allows me select multiple cells anywhere in the grid without them adjoining each other, e.g pressing CTRL and clicking on various cells over the grid. Or if anyone knows how to do this with the standard Delphi TStringGrid. Any pointer would be gratefully received. ...

Benefit of using DBComboBox over CombBox?

So I'm messing around with a new project in Delphi 2009 and the default components that can be dropped onto a form for accessing data consist of a SQLConnection, DataSource and SQLQuery. If I add a simple select to the query component, say: select name from customers and then drop a DBComboBox on the form and link it up with the Data...

How Can I Handle Parameters With Spaces in Delphi?

My program accepts input file names either as command line parameters or in a drag and drop operation or in Explorer by clicking on filenames with an extension that is associated with my program. The command line and drag and drop work fine, but it is clicking on the filenames in Explorer that causes problems when the filepaths of the ...

The stub received bad data

I have a delphi app on an XP SP3 that talks to delphi com+ on windows 2000 server, has been working fine but now for one of the calls to the com+ it wont work and returns the error -The stub received bad data.Although 2 other calls to the com+ work fine.It passes values back to app and can do this for the other 2, thought it was to do wi...

Creating a compound control (parent of other controls) at runtime

Hi. I has a piece of code where I override TStringGrid's inplace editor and the hint window. For this, I created my own string grid based on TStringGrid and use a TEdit for inplace editor and a TPanel for tool tips. In TMyStringGrid.Create constructor I initialize them like this: Constructor TMyStringGrid.Create(); Begin inherited Cre...

Delphi - Keep highlighted selection in RichEdit when focus is lost

Hi, I have an TRichEdit. When I select some text and click on another element, the selection of the selected text disappears. Is there a way to keep this selection, also when the TRichEdit has los it's focus? Thanks! ...

Better Indy for Dephi 2007

Hi all, Which better is using default indy10 that's comes with Delphi 2007 or upgrade it to latest snapshot version and why ? Thank you ...

Jedi Library and Delphi XE

Typically, the install of the JEDI libraries is done using the installer. Does anybody know if the installer Works with Rad Studio XE (Delphi and Builder) Can be easily modified to do so if not Knows of some manual install instructions? Thanks ...

Add a border icon to the form

Using Delphi I would like to add another button to the border icon buttons; close, maximize, minimize. Any ideas on how to do this? ...

Problem testing services in Windows 2000 Advanced Server

Hi there: I developed a little application in Delphi 7 using the unit cwinsrvc, widely used by Delphi programmers. My application only has to test if a service is running. It works in all machines I have tested, including Windows XP and Windows 2000 Advanced Server. The problem is that there is a machine (windows 2000 Advanced Server) i...

Exposing C# COM server events to Delphi client applications

Hi Hector, the url you posted is not working, could you post the answer here. i have been having a headache with this issue, thanks in advance ...