delphi

How to use Delphi Dlls without enabling Build with runtime packages

Recently i started a project with so many forms , frames and extra controls, so my application was swelling up and i am using 3 exes in my projects(all made in Delphi 2009) and these applications are also sharing same frames and forms. so i used dlls to share these forms. but a problem came saying different Tfont error. so i refferd on...

Tables/pointers when using IMAGE_FILE_LARGE_ADDRESS_AWARE 32bit - 64bit

Hello! Lets me ask a very specific question: What is the difference (in memory usage) when you have a large array, or large list of the same size (implemented with pointers). e.g var a:array[1..1000000] of integer; and type po=^p1; p1=record v:integer; next:po; end; var p:po; and you create list with 1000000 integ...

How to fast copy from hash to listview ?

Hi experts: There is a hash pas file http://gpdelphiunits.googlecode.com/svn-history/r4/trunk/src/GpStringHash.pas We can create hash and add key - value Question 1: We want to know how to iterate key - value and copy data to listview. Question 2: is there a way to fast copy like assign method to it? Thank you very much in advance...

How to convert Together Support UML to generic UML

My problem is a simple one. I've created a class library for Delphi 2007 and added the modelling support to it that Delphi offers. It generates nice class overviews of my code, which I'd like to use. But it's not enough. I want to export the generated UML to Altova's UModel to generate some additional documentation and nicer-looking mode...

Delphi windows 7 control panel component

Hi, Im looking for a delphi component that looks and functions like the Windows 7 control panel buttons when you "view by category". Anybody know if something like this already exists? ...

How to show a TPopupMenu when you click a TButton?

Hi, i want to show a popupmenu when click a button. but this procedure has error in Delphi XE. procedure ShowPopupMenuEx(var mb1:TMouseButton;var X:integer;var Y:integer;var pPopUP:TPopupMenu); var popupPoint : TPoint; begin if (mb1 = mbLeft) then begin popupPoint.X := x ; popupPoint.Y := y ; p...

Reading and writing into the XML file

Hi, I need to work on XML files using Delphi. I want to present the xml data in a DBGrid to the user and save the changes done by user in the XML file. For example in the below xml (which was presented to the user), if user changed City of ABC under client and added a new customer with NickName as "AAA" those changes should be reflec...

how to set background image to TListview in Delphi XE?

Hi, how i can to to set background image to TListview in Delphi XE?? i want to make a application like Windows Explorer. ...

delphi exe and dll without build with runtime packages

For my last project i was using many frames in my delphi application ,so i dicided to create dlls and put them inside the dlls(ALL created in Delphi) i have gone through many websites and came up with the code that works but for that example i have to compile both apps and dlls with build with runtime packages which means i have to dist...

How does the Length() function in Delphi work?

In other languages like C++, you have to keep track of the array length yourself - how does Delphi know the length of my array? Is there an internal, hidden integer? Is it better, for performance-critical parts, to not use Length() but a direct integer managed by me? ...

How to pull jpg from a Blob Field in Delphi and display in a TImage?

I have the following code, but it doesn't display the jpg in the TImage: sf := TfrmSplash.Create(nil); ms := TMemoryStream.Create; try bf := TBlobField(dbfuncs.tblBlobs.FieldByName('BBlob')); bf.SaveToStream(ms); ms.Position := 0; sf.imgDisplay.Picture.Graphic.LoadFromStream(ms); sf.Show; Sleep(2000); fin...

How to not have a MainForm in Delphi?

i've been trying to get some modeless forms in my application to appear on the taskbar - taking advantage of the new useful taskbar in Windows 7. There's are many issues with the VCL that need to be undone before a form can exist on the taskbar. But the final issue is that minimizing the form that the VCL has designated the main form c...

Delphi automatic garbage collector

Is it possible to think to have in future an automatic garbage collector in Delphi? There are many applications in which a higly detailed control on when to free an object is not so important and it is just an extra thing to care about. For such applications having a kind of garbage collector that works like java's one would be interest...

how to load delphi tframe from dll to delphi application

i have created a dll with tframe . how can i load it inside my application, i dont like to use bpls , i only want to destribute exe and dlls with my app ...

How do I add a namespace prefix to each node using TXMLDocument

I used the XML Binding Wizard to create a descendant of TXMLDocument. The files generated by this class would declare the namespace in the root node and create just plain, unadorned nodes for the rest of the document. <?xml version="1.0"?> <RootNode xmlns="URL" xmlns:xsi="URL" xsi:schemaLocation="URL"> <SomeNode> <AnotherNod...

is there any way to interpret pascal in Delphi applications

i want my own pascal code to be executed it also have some uses files and other complex functions just like a Delphi code can i do this ...

Delphi object memory allocation

In Delphi, if I have a variable myObject : MyClass, and MyClass has a property that is a fixed-length array with 300 integers in it, when will the memory for it be allocated? When the scope of myObject is entered? When I call myObject := MyClass.Create; (constructor)? ...

Partial Search In Table(BDE)

I made a database with paradox 7. The usual search I do is a syntax like this: Table.Filter := 'Country=' + QuotedStr(Edit.Text); This returns rows those country field is same as the entered text in edit. when I want to search for countries are beginning by "L" i use this syntax: Table.Filter := 'Country=' + QuotedStr(Edit.Text + '*'...

Mocks: How to avoid children talking to parents?

i'm trying to test an object by passing a mock owner. Originally PartD would be passed a PartB1 as its owner: PartD partD = new PartD(partB1); Now i want to test a feature of PartD by passing it a mock owner: PartD partD = new PartD(mockPartB1); This works okay, except there are things PartD does that depends on it knowing some sta...

Delphi: How to move a class out of a unit;avoid circular references

Question: i want to split two classes out to their own file, while avoiding circular references. i have a unit with some classes (and some enumerations and constants). Anyone will recognize Click and Clack the tappet brothers: unit Cartalk; interface type TSolution = (solTransmission, solBrakes, solGremlins); TTappetBrothe...