delphi-7

Consume XML from Delphi 7

I need to get book information from isbndb.com trough XML service using this link http://isbndb.com/api/books.xml?access_key=12345678&index1=isbn&value1=9780321635345. Any Idea how to do that in delphi? ...

TImage does not seem to support Jpeg in D7 (free edition)??

procedure TmainForm.FormCreate(Sender: TObject); var img : TImage; pic:TPicture; begin pic := TPicture.create(); pic.LoadFromFile('my_picture.jpg'); img := Timage.create(Self); img.Picture := pic; end; ... "Project MyProect.exe raised exception class EInvalidGraphic with message 'Unknown picture extension (.jpg)'"...

Downloading a file from the Internet while being able to abort the download any time

Hello All! I'd like to download a file from my Delphi program in a separate thread dedicated to the download. The problem is that the main program can be closed any time (thus the download thread can be terminated any time as well). So even if there is no connection or the server lags for precious seconds I need a way to terminate the ...

Free a TThread either automatically or manually

Hello all! I have a main thread and a separate thread in my program. If the separate thread finishes before the main thread, it should free itself automatically. If the main thread finishes first, it should free the separate thread. I know about FreeOnTerminate, and I've read that you have to be careful using it. My question is, is th...

TRichEdit and URL highlighting problems

I am using the current code to highlight URLs on a TRichEdit: procedure TForm1.WndProc(var Message: TMessage); var p: TENLink; strURL: string; begin if (Message.Msg = WM_NOTIFY) then begin if (PNMHDR(Message.lParam).code = EN_LINK) then begin p := TENLink(Pointer(TWMNotify(Message).NMHdr)^); if (p.Msg = WM_LB...

Delphi: validate email without regular expressions

Hello. Since Delphi does not have any regular expressions library built-in, have you seen a good function to validate email addresses at least to some degree in using only Delphi RTL/VCL? I don't want to link additional *.dll to my product integrating regular expression support and I need also Delphi 7 compatibility. Embedding regex l...

dbDateTimePicker that accepts a Field of type string

Where can I find a free delphi component dbdatetimepicker that accepts a datafield of type string instead of the usual datetime field. Any help is greatly appreciated. Bty I'm using Delphi 7. ...

Threading Framework for Delphi 7 - any?

Hi, I'm looking for some threading framework to avoid writing it from scratches. Especially the tasks queuing and synchronization are what I need. I know OmniThreadLibrary which is great but is not compatible with D7. Any recommendations? ...

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. ...

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...

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...

How to use variant arrays in Delphi

Hello all! I have two Delphi7 programs: a COM automation server (EXE) and the other program which is using the automation server. I need to pass an array of bytes from one program to the other. After some searching I've found that using variant arrays is the way to go (correct me please if you know any better methods). My question is...

Creating a Window Inside TThread

im trying to send a message between 2 separate projects, but my problem is that im trying to make the receiver run inside a TThread Object, but WndProc wont work from inside an Object, must be a function, is there anyway to create a window inside a TThread that can process messages inside the thread? here is what i mean function TDataT...

Declaring fixed size string properties in Delphi

How do I declare a fixed size string property in Delphi? This is what I want to do, but I receive an error: TMyObject = class(TObject) private FName : string[20]; public property Name : string[20] read FName write FName; //<-- error end; The compiler error reads: 'INDEX, READ, or WRITE clause expected, but '[' found'. ...

Syntax Highlighting Example??

is there any easy code sample out there or how-to on how to make a richedit control do syntax-Highlighting ? i tried SynEdit but its very very complicated for me, i was wondering if there was a small code snippet there that i can work on? or just an idea on how to do it as fast as IDEs do? cheers; ...

TcxDBTreeList Delphi 7 not arrowing down

I am using the TcxDBTreeList component with Delphi 7 and I am having some wierd results adding rows. I am using a Tclientdataset for my data. I am appending to it and the row shows up correctly in the treelist. However, its never allowing me to arrow down past the 2nd node in the tree, Even if I've added 10 more nodes. I'm sure it's ...

Delphi 7 Soap WCF Service using basicHttpBinding

I added a basicHttpBinding to an existing Service I have in production in order to expose it for use in Delphi. When I try to use the WSDLImporter from Delphi 7 on the wsdl file, it doesn't work right. A section in the resulting tlb says // ************************************************************************ // // The following ty...

ADO error 'Operation cancelled' in Delphi

I have the following code for executing a sql stored procedure that returns multiple resultsets, then reads this result from stream. For background info: it returns xml blocks as strings and then transforms it into complete xml. It has worked well over a year but now i have a case that results in error message: Operation cancelled. Debug...

SynEdit Problem (Can't Display True Type Fonts Correctly)

I've downloaded a SynEdit version from a Chinese website (with lots of improvements), but as the version on Sourceforge it doesn't support true-type fonts (such as Tahoma); it displays them separated with a space. Anything I can do about this? ...

How To Get An Unique ID?

How can i get an unique id from one of installed hardwares? Something like h.d.d serial or motherboard, ....? Thanks...