delphi

How do I send a TMemoryStream using Indy's IdTrivialFTP?

I am using Delphi 2010 and Indy 10 that ships with it. The MemStream is a TMemoryStream and it contains a file downloaded from a website. IdTrivialFTP1 := TIdTrivialFTP.Create(nil); try IdTrivialFtp1.Name := 'IdTrivialFTP1'; IdTrivialFTP1.Host := 'my-tftp-server-name.contoso.com'; IdTrivialFTP1.Port := 69; IdTrivialFTP1.ReceiveT...

What is Causing This Memory Leak in Delphi?

I just can't figure out this memory leak that EurekaLog is reporting for my program. I'm using Delphi 2009. Here it is: Memory Leak: Type=Data; Total size=26; Count=1; The stack is: System.pas _UStrSetLength 17477 System.pas _UStrCat 17572 Process.pas InputGedcomFile 1145 That is all there is in the stack. EurekaLog is ...

Is There a Way to Tell What Language Was Used for a Program?

I have a desktop program I downloaded and installed. It runs from an .exe file. Is there some way from the .exe file to tell what programming language was used to write the program? Are there any tools are available to help with this? What languages can be determined and which ones cannot? Okay here are two of the sort of things I'...

How to resolve Delphi Winsoft Adonis and Borland Data Access components Conflict?

How do i resolve a conflict between Adonis data components and Borland data component. I have one project that uses the internal Delphi TADOQuery component that has a property Database that connects it to a TDatabase component. Then i have another project that uses TADOQuery from Adonis that has Connection property that connects to the ...

Why might a Delphi 7 application exit with "encountered a problem and needs to close" if the user's PC does not have a printer installed?

I have been getting sporadic reports of my application (compiled with Delphi 7) refusing to start on some PCs - it exited immediately with the Windows error message: “....exe has encountered a problem and needs to close. We are sorry for the inconvenience” My advice up until now has to always been to install a default printer (...

Determining intersection with frustum in GLScene

Hello, using GLScene in delphi I need to find the intersection between an object (a line or plane is enough) and the visible space, to determine what part of this object is currently showing. I tried getting the view frustum but I couldn't find how. I was thinking of using camera's position, direction and field of view, but I suspect the...

Can you recover from a "Resource 1 not found"? in Delphi 2010

A fairly complex project was muddling along with lots of work done last night when I decided to turn in. But thinking about adding some gestures got me up after three hours of sleep and I went at the code again, which was a mistake. I added the gesture manager and then sleepily hit the F1 key to look up the help on gestures. Coming back ...

WriteComponentResFile is not including components dynamically added to TTabSheet

I am trying to convert a set of forms that were created with a custom tool to Delphi forms. I am trying to add all the necessary components at runtime and then use WriteComponentResFile to create the DFM file. All of my initial tests looked good until I tried adding a TPageControl and TabSheets. The current forms can have multiple p...

Moving Columns in a DBGrid seems to move the attached DataSet fields

I observed something last week that I did not expect, and will describe below. I am curious as to why this happens. Is it something internal to the TDataSet class, an artifact of the TDBGrid, or something else? The order of the fields in an open ClientDataSet changed. Specifically, I created a ClientDataSet in code by calling CreateData...

Delphi: storing data in classes vs records, memory usage reduction

Hi, I have quite a lot of data to store, read and modify in memory while the application works. The data could be compared to a tree, where each node is described by limited number of strings and integers, and has quite a lot of subelements. Currently the data is stored using classes/objects, like TRootElement = class fName, fDescripti...

How can I keep Task Manager from killing my program?

Is there any way to protect my Delphi application from being killed by the Windows task manager (or others like Process Explorer)? I think Windows messages can do that (by doing a hook and intercepting the TerminateProcess message). I want an example of this protection. The Kaspersky Anti-Virus suites are like this; we can't end their ...

Protecting strings within a Delphi application

We have a Delphi 2006 application that drives a MS SQL Server database. We have found a vulnerability where it is possible to load the executable into a hex editor and modify the SQL. Our long term plan is to move this SQL to CLR stored procedures but this is some way off since many of our clients still use SQL 2000. We've thought ab...

How to implement a winform dialog in Delphi without IDE?

I don't have the Delphi IDE installed. Can I still design forms? ...

Possible to reinstall Delphi 2007 without having to reinstall Delphi 2009 too?

I have Delphi 2007 and 2009 installed on the same computer. I notice from this question that all installations should be installed from oldest to newest. Does that mean that I'll have to uninstall D2009 and D2007, then reinstall both? Or can I just uninstall/reinstall D2007? ...

How to compile and run this delphi code without installing an IDE?

It's say to generate a winform: var F : TForm; L : TLabel; begin F := TForm.Create(Application); L := TLabel.Create(F); L.Parent := F; // Needed to have it show up on the form. L.Left := 50; L.Top := 50; L.Caption := 'This is an example'; F.Show; end; In fact it's from my previous question If it's C programme,I can ...

Which radio button is selected in a TRadioGroup?

As you can see in my question history, I'm developing a eBook manager, that will be open-source and I will release it in about 10 days, but I have a TRadioGroup, as you can see: And I want to store somethings in a variable(that needs to be a Integer) that will be "linked" with this TRadioGroup. I need to do a if function like this: ...

Is there a simple way to allow tabbing between non-VCL and VCL controls on a Delphi form?

I have a Delphi form with a bunch of VCL controls, like TButton and TCheckBox, and an instance of the Scintilla text editor. I want to be able to tab into and out of the text editor but it looks like tabs are handled by the VCL library not Windows. I stepped though the code and it looks like tabs are handled by the SelectNext and Fin...

Convert Integer Into String

I have a some numbers stored in a Integer called mode, but I need to use they in a TProcess. For this I need to convert the Integer into a String, because if I don't do this, I got the error: Incompatible types: got "LongInt" expected "AnsiString" Then I want to know how I can convert a Integer into a String? ...

How can I append text to the last line of a RichEdit control?

How can I add text not to a new line but to the last existing line? Lines.Add and Lines.Append add text as a new line, and Lines.Insert needs a position that I don't know how to find. ...

How to deploy a Delphi Soap Client (.EXE) on a Windows XP/Windows 2003?

I built a Delphi-7 Windows Application which uses some web services. The application is built in such a way that it does not require run-time DLLs. When I deployed it on a Windows 2003 server it fails while calling the web service. It results in error "Access violation at address 00c05269. Write of address 00c05269". I believe the reason...