Delphi to change JSONMarshalledAttribute running

I have a class in Delphi which I export in jsonmarshalled file. I am skipping some Fields using the JSONMarshalledAttribute, which resides in the unit: REST.JSON.Types. More literature here [JSONMarshalledAttribute(False)] Field1: double; [JSONMarsha

TVirtualStringTree - add an object instead of the record

I have a TVirtualStringTree(version 5.2.2) and I need to add to it's nodes objects instead of records. I have already looked at the answers provided on the question: Delphi, VirtualStringTree - classes (objects) instead of records but they are not wo

how to remove the results from the previous image on tcanvas

its this code procedure TForm1.SpeedButton1Click(Sender: TObject); begin SpeedButton1.Tag := SpeedButton1.Tag + 1; if SpeedButton1.Tag = 4 then SpeedButton1.Tag := 0; //------------------------------------------------------------------------------ wi

How can I call an overloaded function based on enum typeinfo?

I want to draw some themes parts to several TImages. In my code below, GetElementDetails expects a certain enum value. I have the PTypeInfo for the enum type, but I don't know how to type-cast i to the enum type. procedure TForm1.Button1Click(Sender:

Access Violation in Delphi After a Successful Execution

I have written a program in Delphi to compute, display and save a Pascals' triangle for a user-defined number of rows. It works fine (displays the triangle, and allows me to save it), except that it comes up with an access violation at the end! Here

Defining the property of an object in another procedure

I have an object that has some properties: Obj.Big Obj.Rotate Obj.Paint Obj.Lines etc. They are all boolean type properties. In my main procedure, I call another procedure: procedure TMainForm.Create(Sender:TObject); begin SetParameter(BigCheckBox, O

How to add space between numbers, with DisplayFormat

How can I add spaces between numbers with DisplayFormat. Like this example: 50130301037855000150550010000000131000000132 I'm need this: 5013 0301 0378 5500 0150 5500 1000 0000 1310 0000 0132 Anyone have an idea? Thanks.You can not format like that ju

Delphi 7, FastMM4 can not install the job around

i am working on an application that uses FastMM4, from So i have added the FastMM4.pas to the uses clause right at the beginning. In the application i need to run a batch file after FinalizeMemoryManager; in the finalization of unit

Edit requestHeaders in & ldquo; custom & rdquo; delphi browser

I have a browser integrated in my deplhi application (IE). I need to call a certain web app and I need to append a new variable in the header for all the requests that come from my application's browser, like jquery adds to the xhrobj the HTTP_X_REQU

Web user interface for the Delphi desktop application

I want to develop Web UI for my desktop application to allow users do some tasks remotely. The Web UI server and desktop app will run on the same computer. Question is: what is the best way to implement it? I found several possible solutions: The Del

Why Round (-0.0066219357357) returns -1?

I want to Round(-0.0066219357357) and it gives -1. Isn't it supposed to be 0? And what can I use to round it correctly? UPDATE: the number is a result of (LineDirection.X/distance); where LineDirection.X is an integer and Distace is double.Looking in

Reduce the exe file

Using Delphi (or in general any tools, if exist of course), is it possible to reduce size of an exe file, removing all code that not is used but that is present there? (for example, a function or procedure that is present but is never called). I reme

Delphi: communication between executives

How to communicate among frames and within a frame? For example: a Frame 1 and a Frame 2. The frame 2 is in the frame 1. To insert the frame 2 into the frame 1 I add frames from ToolPalette -> type TFrame1 = class(TFrame) Frame22: TFrame2; var MyFram

Migration of data between different DBMSs

As i couldnt get any satisfying answer to my Question it seems we have to write our own program for that, we are in the design phase and we are thinking which format shall we use to backup the data. The program will be written in Delphi. Needed is Ex

Using Doc-O-Matic (Express) with Delphi

I am looking for a tool to generate Delphi source code documentation, and I want to give a try to Doc-O-Matic Express (which is free). Are there any guidelines for beginners how to use Doc-O-Matic Express to document Delphi source code (managing doc-

Delphi Server Socket component

We have a C/S application all written in Delphi (Client and Server-or middleware if you want) For the client part we use Indy. For the server we use DXSock. Since DXSock is dead for a while we are investigating alternatives for the sever part. I want

Creating a general SQL query builder

what would be the best way to create a Query builder in delphi? I have devexpress quantum grid, so I can display data easily.At least as of a few years ago, best query building component for Delphi was "Simple Query", an inexpensive component fr

prob. with tquery.requestlive

Do anyone know how to request a "live result set" in MySql when query has offset(eg: select * from table limit 10 offset 20;). it is throughing an error like 'invalid use of keyword' . Thanks, have no condition behind where and before

Repeat the procedure for each class item

Data.XX.NewValue := Data.XX.SavedValue; Data.XX.OldValue := Data.XX.SavedValue; I need to do the above a large number of times, where XX represents the value in the class. Pretending there were 3 items in the list: Tim, Bob, Steve. Is there any way t

Incorrect pointer operation in TMonitor.Destroy

I'm currently working on porting an existing Delphi 5 application to Delphi 2010. It's a multithreaded DLL (where the threads are spawned by Outlook) that loads into Outlook. When compiled through Delphi 2010, whenever I close a form I run into an "i

Delphi calls a DLL

I have a DLL and want to call it from Delphi extern "C" export_dll_function int RetScreen(int number, char** pbuffer, unsigned long* psize, IMAGE_RESOLUTION resolution, float zoom, int dx, int dy); [DllImport("API.DLL", EntryPoint = &q

Custom drawing in descending TListview

I have a descendant of TListView that offers some additional features, such as sorting and ability to load itself from a TDataset. I now wish to extend this component further so that certain aspects of the drawing can be specified at the time items a

TIdTCPServer does not read socket data sometimes

I have the following code in the OnExecute of a TIdTCPServer (Delphi 2009 and Indy 10 that came with the installation) which is very similar to other examples on this site; Socket := AContext.Connection.Socket; if Socket.CheckForDataOnSource(10) then

Edit the label of a TCollectionItem in the Delphi editor

A component I am working on uses a TCollection to hold links to other components. When the items are edited in the designer their labels look something like this: 0 - TComponentLink 1 - TComponentLink 2 - TComponentLink 3 - TComponentLink How do I ad

Simple anti-aliasing function for Delphi 7

I need a very simple function to draw a bunch of lines with anti-aliasing. It has to follow Delphi paradigm: self contained and SYSTEM INDEPENDENT (no DLL hell), fast, simple. Anybody knows such a library? Until now I have tried: WuLine swissdelphice