delphi

Gecko 2 ActiveX Control VCL component in Delphi?

Hey there, How can I import the Gecko 2 (used in Firefox 2) Active control into the component palette so I can add it to my form at design-time? Basically, I want something like a TWebBrowser component, but not using Internet Explorer. Nor do I want the outdated Mozilla Control ( http://www.iol.ie/~locka/mozilla/mozilla.htm ) or the Ge...

What is this? "TList does not contain a member named ..." in Delphi

I've added some of the new Generics into my Delphi 2009 program. In the Structure window of the Delphi IDE, I'm getting a bunch of errors of the form: 'TList` 1' does not contain a member named 'JumpID' at line 1031 (1031:57) My declarations and lines seem fine to me. And my program Builds without any errors and runs without problem...

Invalid Pointer Operation + Call Stack

Hi, it's my call stack window when i got "Invalid Pointer Operation" Error : What is the reason for this error? Thank you ...

Old Delphi hide/show desktop icons method not working under Windows 7 64 Bit

I have a Delphi 2010 app which shows/hides the desktop icons under XP fine. However under my Window 7 test environment (happens to be 64 bit) the icons don't disappear. Here is the critical code I am using (for the hide): ShowWindow(FindWindow(nil, 'Program Manager'), SW_HIDE ); I have found I can set the registry: [HKEY_CURRENT_US...

Changing a Delphi/Oracle application from 2-tier to 3-tier

In my company they are finally (about time...) considering to convert one of our best selling apps from a 2-tier to 3-tier architecture, both on logical (Presentation, Business and Data layers) as well as physical level. Probably we will go for either a Delphi-Delphi-Oracle or a Delphi-Java-Oracle approach for the change. This is a rel...

showing a xml file contents in a dbctrlgrid

hi anybody i have a win application project that should be done in delphi2010. in a form something like the image below,should be produced: www.up.iranblog.com/Files2/1e867ce0de784c469496.jpg first the image of product and under that tha name and the price. the information should be read from a xml file,but i dont know how to display the...

How to draw a text (write on the screen) using standard OpenGL functions?

I know I can do it with GLUT. But, I have a big project and I had problem adding GLUT (I am using Delphi) to it. So, what other options do I have? ...

Best Practice append, Insert into Table . Queries

Hi trying to acknowledge the best practice to update Insert data from A table A to Table B . I have ADOConnection1 Table Clientes and ADOConnection2 Table Q_Clientes Now i knead to update ADOConnection1 Table Clientes \Q_Clientes has the same similar to Clientes only it´s in another Locacion i can call clientes.FieldByName('Localização'...

Delphi: How delegate interface implementation to child object?

i have an object which delegates implementation of a particularly complex interface to a child object. This is exactly i think is the job of TAggregatedObject. The "child" object maintains a weak reference to its "controller", and all QueryInterface requests are passed back to the parent. This maintains the rule that IUnknown is always...

Is not freeing TMemoryStream causing a memory leak?

I am using TWebModule with Apache. I am having problems with a memory leak. In the code below is not freeing the ImageStream a memory leak? If I do free it I get an access violation. procedure TWebModule1.WebModule1WebActionItem8Action(Sender: TObject; Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); var ...

Calling SHGetSetSettings from Delphi

I just read this question and this question, and since then I have been trying to call SHGetSetSettings in Delphi. This is a function of shell32.dll, but is not defined in ShlObj.pas, so we need to write our own definition. First we need to translate the SHELLSTATE structure. Now I have only limited experience in C, but I suppose that "...

Does Delphi 2010 have a LoadTextFromFile function?

While porting some code from Delphi 7 to Delphi 2010 I was rewriting my LoadTextFromFile() function. function LoadTextFromFile(const aFullFileName: string): string; var lBuffer: TBytes; lEncoding: TEncoding; lFileStream: TFileStream; lSize: Integer; begin if not FileExists(aFullFileName) then begin raise Ex...

How to Recognize that an Application Intends to Execute \ Run a File ?!

I need to recognize and fire an event when a file is going to be executed or run by an application. I know I can do it by hooking windows procedures, but I don't know what procedure or event of windows fires. For example, when an autorun file going to execute, my application should recognize it, Like an antivirus application. I'm not su...

Detecting TWebModule Memory Leaks

I have a Delphi Apache Shared Module. The base class is TWebModule. I can run it using the debugger by specifying the following parameters: Host Application: C:\Program Files\Apache Software Foundation\Apache2.2\bin\httpd.exe Parameters: -X -w -f "C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf" I believe I may...

Insert an image on each row in an Excel Sheet with Delphi

My Delphi 6 program need to place an image on each row of my of Excel Sheet. I could insert a picture to a fixed position with something I read from another post. procedure insertImages(ActiveSheet: OleVariant; ImageFilePath: String; ImageHeight, PictureTop, PictureLeft: Integer); var Picture: OleVariant; begin try Picture ...

client side web service

Hello, I am a delphi newbie and trying to access a web service and having trouble setting up the instruments and instrument array to add into a request. I have attached the code, definition of the service below, any help would be a great advantage. Var abc:submitGetDataRequest; cc:array_of_instrument; bb:Instrument; begin abc:=submit...

UTC support for comparing 2 files date/time

I have a utility that compares a source and destination file date/time. This works in most cases but fails when comparing date/time for files in different time zones. So I need a UTC datetime routine. From looking around it seems the Windows API GetFileTime will support this. I also found this wrapper procedure, but it crashes on the...

Performance Improvement

I am thinking about improving the performance of IO, I don't completely understand the IO structure and I would like some help from the developers here. I think if all fields are read when the first command to get ID and class is executed and stored in Object store and then RetrieveObject gets objects from ObjectStore it might give some...

when to use object.free and freeandnil(object);

Possible Duplicate: Which is preferable: Free or FreeAndNil? when to use free and freeandnil? in my way, i usually use the .free when the object that created is something like "object.create;" that has no self or nil parameter. if there is, that's the time i will use the freeandnil(); am i doing it right? or it has a big def...

Which effect do interfaces have on execution speed in Delphi?

If I replace all object references in my Delphi program with interface references, and use objects which are inherited from TInterfacedObject, will the resulting application run with the same speed as before? Or does the reference counting add a significant execution overhead at run time? ...