Hello,
if Form.Release is called after using the form, it will free all related memory but not set the form variable to nil.
if not assigned (Form1) then
begin
Application.CreateForm(Tform1, Form1);
try
// Do something
finally
Form1.Release
end;
end;
To be able to call the same code again, Form1 would ...
According to this page, it's possible to use TClientDataset as an in-memory dataset, completely independent of any actual databases or files. It describes how to setup the dataset's table structure and how to load data into it at runtime. But when I tried to follow its instructions in D2009, step 4 (table.Open) raised an exception. It...
I've been a long-time Delphi developer and honestly day by day it started to feel more and more cumbersome especially in this age of dynamic languages like Python or Ruby. And not only the dynamic ones are progressing fast, C# and Java too are progressing at a fast rate due to competition (which were more or less comparable to Delphi's l...
I asked about setting up an in-memory dataset with TClientDataset, and was told I had to use the "Create Data Set" command in the form designer. That works just fine until I try to create a master-detail database relation. If I have a field def of type ftDataSet, then running the Create Data Set command (or calling the method at runtim...
Hi gents, I've been thinking of rolling my own code for enabling my Delphi application to update seamlessly as I'll be going for "release often, release early" mentality furthermore. There are various Delphi solutions both freeware or paid out there and I'd like to ask if you've been using any of them or simply went on with your own solu...
Hi,
I'm looking to add a 14-Day trial limit to my software. The program has been written in Delphi 7.
Any help would be much appreciated.
...
I've created an excel sheet with Delphi 6. Now I have to add a picture to my sheet. Anybody knows how to do that?
...
Hello,
what is the difference in using a standard
type sl: TStringList
compared to using a generic TList
type sl: TList<string>
?
As far as I can see, both behave exactly the same.
Is it just another way of doing the same thing?
Are there situations where one would be better than the other?
Thanks!
Holger
...
I'm looking for a (preferably free) component for Delphi for users to easily select about 100 different colours.
I've currently got one as part of DevExpress's editors, but it only has about 20 proper colours to choose, with a bunch of other 'Windows' colours like clHighlight, clBtnFace, etc.
It's for regular users, so would like to av...
I've tried my best and cannot figure out what happened here. It worked fine in Delphi 4. After upgrading to Delphi 2009, I don't know if this is the way it is supposed to work, or if it's a problem:
This is what my program's menu looks like in Design Mode under Delphi 2009:
Notice that every word in the Main Menu and the File submenu...
With the introduction of Delphi 2009, a lot of features are added to the Object Pascal language. Almost anybody knows about generics and closures, but there are more, and not all of them are documented (or at least hard to find).
What are the lesser known language constructs of OP that you know about?
...
I need an algorithm to store a key/value pair, where the key is an Int64. I'm currently using a sorted IntList (same as a TStringList, but stores int64s). This gives me O(log n) for search, Insert and delete operations. Since I don't ever need the items sorted, this is a little inefficient. I need some kind of hashtable for O(1) operatio...
Anyone that used the (not anymore) freely available TPngImage by by Gustavo Daud tried porting their projects to Delphi 2009?
In my case, it seems that all TImage png images that displayed just fine in D2007 are now blank when opening the form in D2009 (if I re-add the image in D2009, save the form and open it in D2007 then the image is...
I have the very same delphi version, bpls, components, everything. And yet in three machines the resulting executables are different in size.
What else can influence in the size of the exe?
In my machine I get this size (Vista 6.0.6001):
4.547.584 bytes
In my colleague's machine, he gets (XP 5.1.2600 SP3):
4.530.688 bytes
In a thi...
After reading The Pragmatic Programmer, I became quite accustomed to VIM. When in Visual Studio I have ViEmu (http://www.viemu.com/) to provide me with VIM functionality.
Is anyone aware of a similar program/key binding/workaround to integrate VI/VIM key bindings in CodeGear Delphi 2007?
...
I would like to declare a record in Delphi that contains the same layout as it has in C.
For those interested : This record is part of a union in the Windows OS's LDT_ENTRY record. (I need to use this record in Delphi because I'm working on an Xbox emulator in Delphi - see project Dxbx on sourceforge).
Anyway, the record in question is...
I want to store a large result set from database in memory. Every record has variable length and access time must be as fast as arrays. What is the best way to implement this? I was thinking of keeping offsets in a separate table and storing all of the records consecutively? Is it odd? (Programming Language: Delphi)
...
I noticed that EStackOverflow, as defined in SysUtils.pas is marked as deprecated in Delphi 2009. I checked and it was also marked as deprecated in 2007. I have a Delphi 7 install disk here, but I thought I would ask if anyone knows when it was deprecated.
Additionally, does anyone know why, and what replaces it? I wrote a test appli...
I'm converting my applications to Delphi 2009 and faced an intriguing issue with some calls that need to convert a string (wide) to AnsiString.
Here's an example to demonstrate the issue I'm having:
var
s: PAnsiChar;
...
s := PAnsiChar(Application.ExeName);
With Delphi 2007 and previous versions, s := PChar(Application.ExeName) w...
I have a TObjectList with OwnsObjects = true. It contains quite a few objects. Now I want to remove the object at index Idx from that list, without freeing it.
Is the Extract method the only option?
ExtractedObject := TheList.Extract(TheList[Idx]);
All other methods seem to free the object. I am looking for something a little bit more...