Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am using tidtcpserver to receive continuously stream and text from a client.

I wanted to enhance my current protocol to safely receive merged data from a client weather its memory stream or string

here is my current protocol

procedure TForm1.TcpSExecute(AContext: TIdContext);
  Params: array [1 .. 200] of String;
  Connection: TConnection;
  Command: String;
  ParamsCount, P: integer;
  MS: TMemoryStream;
  ReceiveParams, ReceiveStream: BOOLEAN;
  I: integer;
  DECODES: String;
  Connection := AContext as TConnection;
  Command := AContext.Connection.Socket.ReadLn(IndyTextEncoding_UTF8);
  ReceiveParams := False;
  ReceiveStream := False;

  if Command[1] = '1' then // string command
    Command := Copy(Command, 2, MaxInt);
    ReceiveParams := true;
  else if Command[1] = '2' then // string + stream
    Command := Copy(Command, 2, MaxInt);
    ReceiveStream := true;

  if ReceiveParams then // String is incomming
    S := AContext.Connection.Socket.ReadLn(IndyTextEncoding_UTF8);
    DECODES := Decode64(S, IndyTextEncoding_UTF8);

    ParamsCount := 0;
    while (DECODES <> '') and (ParamsCount < 200) do
      P := Pos(Sep, DECODES);
      if P = 0 then
        Params[ParamsCount] := DECODES
        Params[ParamsCount] := Copy(DECODES, 1, P - 1);
        Delete(DECODES, 1, P + 5);

  MS := nil;
    if ReceiveStream then // 

Open in new window

Independent Software Vendors: We Want Your Opinion
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

i'have question about reporting service reportservices,I'm trying to connect to the reporting  web service sql server but an exception is raised, password or user are wrong error 401 unauthorized .
But i'm sure that they are correct this is how i use it :
I have imported a wsdl and i have got reportservice2005.pas.
Why i can't Authentify knowing that i can with browser how to use the methode LogOnUser() ? or THttpRio? to authtify.
this is the procedure i'm using :
procedure TfMenu.Button1Click(Sender: TObject);
   defURL  = 'http://khali-pc:80/ReportServerSQL2016/ReportService2005.asmx';
   Report : CreateReport;
   ReportingService :  ReportingService2005Soap;
   stream           :   TFileStream;
   tailleBuffer,I     : Integer;
   UserLog          : logonUser;
   Rio1              : THttpRio;

 Rio1 := THttpRIo.Create(self);
   Rio1.HTTPWebNode.UserName      := 'SomeDomain\SomeUser';
   Rio1.HTTPWebNode.Password      := 'xxxxxxx';

ReportingService := GetReportingService2005Soap(false, defURL, nil) ;

/////********** Second way to authenificate*********************// PS: and the first way to athentificate is to include password and user in RIO (THttpRio) above

/// second method to authetify to SSRS
//   UserLog                  :=       LogonUser.Create;
//   UserLog.userName  := 'SomeDomain\SomeUser';  
//   UserLog.password   := 'xxxxxx';
//   UserLog.authority     :='' ;
//   …
hi everyone,

  here we have an  Delphi application, it's functionality is to receive data from Ethernet and  to store received data in database(Interbase DB) . to store or retrieve data in Interbase DB(Local DB) we are using BDE components. and here we are posting that data to Azure cloud using ADO components. when ever we deployed our application into client system it is working well for sometimes 3hr and sometimes 4hr and sometimes even 24 hr also it is working well but after that we are getting the above exception and exe getting hanged and forcibly stopped. I have searched about above exception all over the internet but didn't get an idea what to do. but crazy thing is this application has ran continuously for 4 days continuously whenever we tested it in my system.  I think it is something to do with BDE Components.
 forgive me if you are not able to understand my English.
Any suggestions or solutions are helpful.
i asked the question in many places and seems no know are really know how this can be solved

i a trying to apply a on gesture event to the Twebbrowser
 but it seems it does not work at all .

here is how i place the Twebbrowser

1 - i  added Tlayout
2 - i added inside the Tlayout a Tpanel
3- i added inside the tpanel a Twebbrowser

also i have set webbrowser.hittest To True , then i dropped a gesture manager to the form then i set the gesture manager to the Twebbrowser Touch property .

then on gesture manager i have added the following code

if EventInfo.GestureID = sgiLeft then
showmessage('left moved');
Handled := true;

Open in new window

sadly when i move my finger left or right it does not detect the gesture and never show the message that i set

why i cannot use gesture in twebbrowser ?
I'm binding a grid to a clientdataset, but once I do, everytime I try to run the application I get "Cannot change this property when using LiveBindings".
I am writing a REST client application using Embarcadero C++ builder Xe10.1 Berlin.
I need to have the REST server IP address configurable.
I have initially set the TRESTClient component BaseURL property to a known server IP address in the IDE. The BaseURL property value is and the application works just fine.
If I add code to change the BaseURL property however, the application doesn't respond and times out ?
Even if I use the value that works when set in the IDE, after the following code is run the application stops working ?

RESTClient1->BaseURL = u"";

Open in new window

Any ideas please ?
I launch delphi app app1 from another Delphi application app2

How to debug app1?

Both running from same machine and I have source for both
I have a problem with a 3d object (TCube).
All movement is correct if object is not rotated.
But when object is rotated, the moving axes not work correct, for example: when i drag to move the object movement was denaturated.

Please help
We need to create a bat file for our Delphi program (Windows environment) in order to help our personnel for avoiding manual operations and possible deleting some crucial files.
I  am trying  to explain you  it simply

We have a shared folder located on Z (map network drive) with name X , so
elegktes.pngThe folder contains a subfolder with name active
•      Every person who is assigned a task (e.g a car plate) is put into active folder.
•      Every person who is free (able to be assigned a job) is outside active folder

For example, We have for the active folder the following
We only use Greek characters for the name of the files.
If a car with plate KNK1234 is assigned to ABC person then the file is
ABC_ΚΝΚ1234.ini, where ABC is the full name of the employee

What we want is
a pilot menu so every time somebody clicks the bat file open a window which says
Which person you want to release? (I will translate all the text into Greek language)
It will display the name of the employees (We can modify it , so the program will read only the names which are inside the active directory)
I will provide the name of the employees (about 6-7 persons)
Do you want to release name of employee Yes or No
Release process (Every time the work on a car is completed, the worker is automatically released from the program.)
There are, however, sometimes for some reasons (repeating a process, etc.), which should be released through a process.

The full name of the person…

I want to trap all message(click button, enter edit, etc.) from control in TPanel or TGroupBox, I was trying to modify though windowproc.  but I dont know how to make generic, so I dont need to modify every Tpanel I put on Tform.  

My goal is to get those message to create a log.  I'm using a Tcomponent.  

Any help with this.  thank you.
Free Tool: Subnet Calculator
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.


I need a collision function for a random number of 3D objects (TCube) in a Viewport.

Only one of TCube object is moving at a time (by mouse move) and i need to collide (and stop) when another 3D object standing in his way.

I try a lot of ideeas but with small result.
im struggling to find a way to use the FGeocoder.GeocodeReverse(NewLocation); to convert String address input by user to be converted to coordinate (float), using Rad studio XE8). if possible a full demonstration would do justice. convert sting address to Longitude and latitude.
brwser.wb1.OleObject.document.GetelementbyiD('zip').Setattribute('value', names[i]);

Open in new window

Consistently if does the submit but the zip code only gets filled correctly the first time in - I noticed that after that the web page has the following Javascript added.

[ code]           var query = {"FirstName":"","LastName":"","County":"","City":"","ZipCodes":["33510"],"States":.......] [/code]

However the form and field name are the same and the submit always works just the zip is prepopulated by the JS and I can't seem to change it.
I have used 3 set of codes(where I used Indy10.6.2 component), which doesn't show any errors, but i can't able to send SMS through the code. Please help me to send me the Sms through Delphi code

The code which I used is...

  URL = '****&hash=****&sender=TXTLCL&numbers=9198........&message=HISUNDAR';
  //URL = '*****&hash=******&sender=TXTLCL&numbers=9198...&message=HISUNDAR';
  ResponseSize = 1024;
  hSession, hURL: HInternet;
  Request: String;
  ResponseLength: Cardinal;
  hSession := InternetOpen('TEST', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
    Request := Format(URL,[Username,Password,Sender,Numbers,HttpEncode(Message1)]);
    hURL := InternetOpenURL(hSession, PChar(Request), nil, 0,0,0);
      SetLength(Result, ResponseSize);
      InternetReadFile(hURL, PChar(Result), ResponseSize, ResponseLength);
      SetLength(Result, ResponseLength);

http : TIdHTTP;
IdSSL : TIdSSLIOHandlerSocketOpenSSL;
 http := TIdHTTP.Create(nil);
 IdSSL := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
  Http.ReadTimeout := 30000;
  Http.IOHandler := IdSSL;
  IdSSL.SSLOptions.Method := sslvTLSv1;
  Http.Request.BasicAuthentication := True;
 // IdSSL.SSLOptions.Method := sslvTLSv1;
J'ai un DBGrid en Delphi 7 qui est lié par un tableau crée avec Paradox qui contient RéfBac ,NombrePiècesRebutés , le Réf bac peut etre répéter plusieurs fois je veux calculer la somme des pièces rebuts pour chaque RéfBac et l'insérer dans la colonne PCSNonOk exactement dans la ligne contenant le dernier RefBac avant qu'il change j'ai trouvé ce algorithme qui fait le calcul juste mais il insére le résultat dans la ligne juste après :
RéfBac      NombrePcsRebutés            PCSNonOk
001                       01
001                       00
001                       02 =============>Somme1
002                       00
002                       01=============>Somme2
003                       02

Vax := DataModule1.Ouvraison.fieldByName('RefBac').value;
                  while (not DataModule1.Ouvraison.EOF)   do

                     If(DataModule1.Ouvraison.FieldByName('RefBac').Value= Vax ) then
                     DataModule1.Ouvraison.fieldByName('PCS NOK').value := …
Im not a programmer so please bear with me.... i need help filtering time in my report...

the code the im using is

the result shows all the time from 7:30 to 8:00 and 12:30 to 13:00 now i want to only show the time range from 7:30 to 8:00 ..anyone please help... thanks

I need a function writed in Firemonkey (Delphi XE 10.2) to export a TDummy as a file (from a Viewport3D), and import this file back as original exported TDummy.
The TDummy contain various number of childrens like other TDummy, TCube... etc.
The exported/imported file should include all childrens from original TDummy.

Can someone write this function for me and how much it will cost ?

Thank you
I had this question after viewing delphi intraweb upload file.

I have an Intraweb app  (Delphi XE4) which successfully uses IWFileUploader. User can upload a file to the application's dedicated folder if they access the app via a windows pc.

Problem is that one of the users has a Samsung Android tablet which they use to access the web application, and IWFileUploader doesn't work.
Ideally they'd be able to take a photo with the tablet, and upload it to the Intraweb app's web directory.

Is this even possible?
What's the best way to proceed?

I'm developing a EmbeddedWB Delphi software.

I need to change a url select object, from default selection to new selection.

I've changed the selection value, by executing javascript code, but there is an onchange event, that doesn't fire...

With Internet Explorer 7, this code works:


procedure TBrowserPageIE.Test;
  doc : IHTMLDocument3;
  el  : IHTMLElement;
  v   : OleVariant;
  if FBrowser.Document <> nil then begin
    if FBrowser.Document.QueryInterface(IHTMLDocument3,doc) = S_OK then begin
      el := doc.getElementById('select');
      if el <> nil then begin
        (el as IHTMLSelectElement).value := 'UPS';
        (el as IHTMLElement3).FireEvent('onchange', v);

But in new versions, since Internet Explorer 11, this code doesn't works...

Have you some idea to fire events??

Free Tool: Path Explorer
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

I have the code:

  TButton = Class (stdctrls.TButton)
    procedure Click; Override;

Procedure TButton.Click;
  Enabled := False;
  Enabled := True;

(This stops a user from making a ButtonClick event happen twice if they double click on a button)

My problem is: A few of my buttons have to disable themself if a certain case is met, but the double click cancellation procedure I added re-enables them after they disable themself. I know why this happens but is there any way of preventing this?

Dear Expert,

I am using TIdSMTP and TIdSSLIOHandlerSocketOpenSSL to send mail from DelphiXE3 application. It was running well but i am getting error when i used this application in windows 12 server. The error is :"Connection Closed Gracefully". Kindly suggest how to overcome this problem: My code is as below: (Problem occurs at   SMTP.Authenticate;)

Function ConnectServer: Boolean;
Result := False;
  SMTP := TIdSMTP.Create(nil);
  SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
    SSLHandler.MaxLineAction := maException;
    SSLHandler.SSLOptions.Method := sslvTLSv1;
    SSLHandler.SSLOptions.Mode := sslmUnassigned;
    SSLHandler.SSLOptions.VerifyMode := [];
    SSLHandler.SSLOptions.VerifyDepth := 0;

    SMTP.IOHandler := SSLHandler;
    SMTP.Host :=vHost;//
    SMTP.Port := StrToInt(vPort);//587;
    SMTP.Username := vUserId;
    SMTP.Password := vPwd;
    SMTP.UseTLS := utUseExplicitTLS;

    on e: Exception do
      MessageDlg('Error while initializing SMTP server: ' + sLineBreak + e.Message, TMsgDlgType.mtError, [TMsgDlgBtn.mbOK], 0);

    if SMTP.Connected then

    on e: Exception do
      MessageDlg('Cannot connect to SMTP server: ' + sLineBreak + e.Message, TMsgDlgType.mtError, [TMsgDlgBtn.mbOK], 0);…
I wish to implement interactive gesturing (Zoom)  in an android application that uses an FMX TGrid control. so far I have not succeeded.

The Embarcadero documentation for enabling Firemonkey  Interactive gesturing is as follows :
Enabling Standard Gestures To add support for standard gestures for a control, you need to do the following:

In the Form Designer, add a TGestureManager to the control you want to enable for gestures. Either give the GestureManager a unique name or just use its assigned name, such as GestureManager1.
In the Object Inspector, assign the TGestureManager in the Touch | GestureManager field of the control.
In the Object Inspector, select the specific custom gesture(s) from the Touch | Gestures field of the control.
Implement the OnGesture event procedure for the control and handle the appropriate EventInfo.GestureId.

I am stuck in " Implementing the  OnGesture event procedure for the control and handle the appropriate EventInfo.GestureId"

Any help would be appreciated.

I am using C++ Builder XE10.1 Berlin
I was wondering if someone can go through my code and see where a memory leak or something could be. When I open my form it opens the camera and scan the barcode and decodes it and closes the form. When I open the form and repeat the process my messagedlg text is bold and program becomes slower and my fingerprint reader I also use just stops scanning.

This is what I have. Am I closing everything correctly on the correct places and am I creating everything correctly?

unit ScanUnit;


Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, sSkinProvider, Vcl.ExtCtrls, sPanel,Zbar, Vcl.StdCtrls, sButton, sLabel;

TScanForm = class(TForm)
sSkinProvider1: TsSkinProvider;
sPanel1: TsPanel;
sButton1: TsButton;
RegScanPanel: TsPanel;
sLabel1: TsLabel;
procedure FormShow(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure sButton1Click(Sender: TObject);
{ Private declarations }
{ Public declarations }

ScanForm: TScanForm;

//QR Barcode
device: pansichar;
proc : zbar_processor_t;
image : zbar_image_t;
ScanType : String;
ScanVoucherNr : String;
ValidVoucherNr : String;
ValidVoucherTime : Double;
ValidVoucher : Boolean;

procedure ScanQR(img: zbar_image_t; userdata: Pointer); cdecl;
procedure IntegratingWindow(WindowHandle: THandle; Container: …
É possível compilar o Delphi 5 para 64 bits. com InstallShield Express for Delphi 5?
Onde posso encontrar tutorial sobre o assunto se for possível?
My goal is to implement a document manager that is able to accept every file you drop in it, but which is also able to accept mails directly from outlook. Managing the file drop isn't a big problem and works really well, but I can't get the drag an drop from outlook working.

I found a drag and drop library (Melander dk)  that is able to accept mails directly from outlook, but I can't get it working together with the Virtual Treeview component. I would like to be able to drop mails to a specific node in the Tree. Is this possible using the Melander Dk library ? Or can I get the mail by handling the standard onDragDrop event from the Virtual Treeview?






Delphi is the most powerful Object Pascal IDE and component library for cross-platform Native App Development with flexible Cloud services and broad IoT connectivity. It provides powerful VCL controls for Windows 10 and enables FMX development for Windows, Mac and Mobile. Delphi is your choice for ultrafast Enterprise Strong Development™. Look for increased memory for large projects, extended multi-monitor support, improved Object Inspector and much more. Delphi is 5x faster for development and deployment across multiple desktop, mobile, cloud and database platforms including 32-bit and 64-bit Windows 10.