We help IT Professionals succeed at work.






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.

We have an in house program, such like and an ERP package written with Delphi 2007.  We can get to the code, see it, and make changes.  The problem is we have no idea what we are doing.  We need help with this program, and are willing to pay for help.  We moved this program to a different Server and now we are having multipble issues and cant fix it.

Our in house (new programmer) is looking for any help he can get to solve these issues. So if you are looking for a challenge, we have just the one for you.  If Interested please send email to darrenl@witcoinc.com for first contact.  He can give you specific information you may need to decide if you can Help.

Thanks in advance for any help or advice you can give.

Mark H.

using Delphi 10.1 and outlook 365.
There are only some clients where I have the problem: I can not send EMail from my application. On my computer and most other clients-computers it works. But there are computers, where only outlook is startet but no send-window is opend. Retring a second time, outlook is startet also a second time...
    MailItem1 := OutlookApplication1.CreateItem(olMailItem)  as _MailItem;
    while toAdress <> '' do
      if Pos(';',toAdress) > 0 then
        toAdress := '';
    MailItem1.CC := ToCC;
    MailItem1.BCC := ToBCC;
    MailItem1.Subject := Subject;
    if EMailOutlookAbsender = '' then  //local definitions?
      if Pos('@',getOptionMandantS('EMail_Absender','')) > 0 then
        MailItem1.SendUsingAccount := OutlookApplication1.Session.Accounts.Item(getOptionMandantS('EMail_Absender',''));
    else MailItem1.SendUsingAccount := OutlookApplication1.Session.Accounts.Item(EMailOutlookAbsender); //globale Einstellung
    Mailitem1.BodyFormat := olFormatHTML;
    //the default signature is added
    ObjectInspector := Mailitem1.getinspector;

    if ObjectInspector.EditorType = olEditorWord then
      WordEditor := 

Open in new window

Embarcadero documentation says TFileOpenDialog.ClientGUID "holds a GUID associated with a dialog's persisted state".

But where does it store this persisted state? Does it persist between session of the application or just throughout one session?

how can I determine font colour based on background color

Thank you
I am programming with Delphi XE 10.1 Berlin
Is it possible that the "hint" text defined on a TStringGrid when it becomes visible, has different texts if the mouse is over one cell or another ?
I save text files created in some kind of program developed by delphi 5.The default type of text encoding is ANSI. I don't want to use notepad to convert a  File From ANSI to UTF8.

So how can I convert a  File From ANSI to UTF8 by delphi 5? Thanks.
Hello guys,

I need help to create a function, I am trying it, but I confess that I am lost.

The function works with date, then imagine you have a formatted date like 20/12/2019  (dd/mm/yyyy)

I want to add 40 days on it or any days ahead (30, 70, 84, etc days), until here it is fine for me and I can do that, very easy.

Now, this part is my problem, I have a list of possible day that my date must be, for example 3,6 ( Tuesday and Friday), if my date
after added 40 days ahead gets on Saturday or Sunday or Monday, it must be placed on Tuesday.
If my date is on 4, 5 ( Wednesday or Thursday) it must be placed in Friday;

The rule of my string possibles days can be change, today I work with 3,5 but in the future, it must be in 2,7.

I thank a lot any help
It appears that this Version of Delphi has removed access to private Fields.
JvFormStorage produces an AccessViolation when trying to exctract Sections.

Code Snippet:

function TMemIniFileHelper.ValueExists(const Section, Ident: string): Boolean;
  I: Integer;
  Strings: TStrings;
  Sections: TStringList;
  {$IFDEF RTL310_UP} // 10.1 Berlin removed the access to private fields
  Sections := TMemIniFileAccess(Self).FSections;
  Sections := Self.FSections;
  {$ENDIF RTL310_UP}
  I := Sections.IndexOf(Section);
  if I >= 0 then
    Strings := TStringList(Sections.Objects[I]);
    I := Strings.IndexOfName(Ident);
    Result := I >= 0;
  end else
    Result := False;
Is there an easy and elegant way to detect if a specific object has been created ?
In my case, objects to verify are forms.

I have a c++ program which launch a Delphi DLL where there are informations i need in C++.

So I need to return data from Delphi to C++.

I make some tries, and the last succefull try was to pass a c++ pointer to function and use the function in the delphi side;

Until Now, everything is OK;

the problem occurs when i try to send string from Delphi to C++; I receive non comprehensible string; ( chinese letters + arabic letters + mathmatical symbols ).

after several tries; I noticed that in Delphi, the problem occurs if there is a UnicodeString or String in the program even if it is not in the string sent to C++.

If I have only PWideChar in the program, that works; if there is String or UnicodeString, AnsiString ..., (even if it is not concatenated to PWideChar), the received string is unreadable.

I hope find a solution for this problem. I will put some code in commentaires.
I am using Delphi from within Rad Studio 10.2 to write a small program to see exactly how to talk to a device via USB. The device will appear as a Com port. I have a working shell for my program and started to write in the details for how to open, configure, write to, and close a port. I started with close because it is the smallest. I am getting the error message undeclared identifier 'CloseHandle'. Is there a UNIT I need to add to USES ?
Hi, I have been trying to Build a 64 bit Delphi project with a Bamboo Continuous Integration Build Server.

The weird thing is that I'm able to build the 64 bit project on the server machine itself using MSBuild in the Windows Command Line, but not through Bamboo.

But when making Bamboo run the same cmd script as on the server itself it always returns the error:
'error F1027: Unit not found: 'System' or binary equivalents (.dcu)'

Searching Google said that this was a problem with not including the right paths for the relevant Delphi components. But after including all of the paths it still doesn't compile a 64 bit Delphi project.

Here is the cmd batch script that Bamboo executes:
@SET BDS=C:\Program Files (x86)\Embarcadero\Studio\19.0
@SET BDSINCLUDE=C:\Program Files (x86)\Embarcadero\Studio\19.0\include
@SET BDSCOMMONDIR=C:\Users\Public\Documents\Embarcadero\Studio\19.0
@SET FrameworkDir=C:\Windows\Microsoft.NET\Framework\v3.5
@SET FrameworkVersion=v3.5
@SET FrameworkSDKDir=
@SET DXVCL=C:\Program Files (x86)\DevExpress VCL
@SET PATH=%FrameworkDir%;%FrameworkSDKDir%;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin;C:\Program Files (x86)\Embarcadero\Studio\19.0\bin64;C:\Users\Public\Documents\Embarcadero\InterBase\redist\InterBaseXE3\IDE_spoof;$(BDSLIB)\win32\release;$(BDSLIB)\win64\release;$(BDSLIB)\win32\fura;$(BDSLIB)\win64\fura;C:\Program Files (x86)\Embarcadero\Studio\19.0\source\rtl\sys;C:\Program Files (x86)\DevExpress VCL\Library\RS25;C:\Program 

Open in new window

I have a service written in Delphi.  it has been tested and run on many machines.
it writes to a log file(on create/install/uninstall), then starts an executable periodically

however, setting it up on a new 2016 server VM (created through Azure if that helps)
isn't going to well.

the log file isn't being written to(ever), and the the service absolutely is refusing to start.

the application it is starting has been tested and is runs with no issue.

the Account being used is the local system.
we have also tried using the admin user, same result.
It fails with error 1053,  and no log is generated (I have startup message in the create statement), I don't know where to look

any idea would be appreciated

I have al lot of coded strings that look like below.
  '     END                  ' + chr(13) +
  '   ELSE ' + ''MyVar'' + '                           ' + chr(13) +

Open in new window

What I would like to accomplisch is to remove all spaces, except one, before ' + chr(13) +. The number of spaces will differ per line of code.
Result should be:
  '     END ' + chr(13) +
  '   ELSE ' + ''MyVar'' + ' ' + chr(13) +

Open in new window

Is there an easy way to do this automatically inside the Delphi Editor (maybe some macro?), or is there another solution?
I have started a project which connects to a Facial Reader.
For the life of me, I can't seem to import the functions in this dll into Delphi.

This dll was written in C#.

The commadline:

%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm C:\Users\Public\Desktop\Riss.Devices.dll /tlb:C:\Users\Public\Desktop\riss.Devices.tlb

succeeds, but there are no exported functions in the resulting tlb - File.

Question is whether there is a Dll, which was written / adapted to Delphi?

If anyone has experience with this, I would REALLY appreciate your Input.

I will make an own form like this and save it in myForms:
  TMyForm = class(TForm)
    FmyInteger : integer;
    property myInteger: integer read FmyInteger write FmyInteger default 0;

Open in new window

When I make a new form I can not see the new property. How I have to do?
unit myUnit;
    uses myForms;

    TF_MyForm = class(tMyForm)


F_myForm : TF_MyForm;



Open in new window

I can use this property myInteger in code but I can not see it in the designer. How to do? Thanks, Peter
I am unable to get any reply from the Getit Package manager in Embarcadero RAD Studio 10.2 or Embarcadero C++ Builder  XE 10.1 Berlin.
Does anyone know when this will be fixed by Embarcadero ?
Hi Experts!
I am having a lot of trouble finding a code that encrypts a string (max 100 characters) with php code and that it is possible to decrypt the same string in Delphi (Tokyo version 10.2).
I searched a lot online and also on EE. Such as here:


But none of these works!

The solution to use the base64 encode/decode is not enough.
I would appreciate Rijndael 128 bit Encryption or better.

Many thanks in advice.
Is it possible to hide the main form in a Windows application written in Embarcadero C++ builder XE 10.1  ?
Hello Guys,

What is wrong with my DLL creation? I got an error when I try to use it:

Dll code:

library knPassServer;

{ Important note about DLL memory management: ShareMem must be the
  first unit in your library's USES clause AND your project's (select
  Project-View Source) USES clause if your DLL exports any procedures or
  functions that pass strings as parameters or function results. This
  applies to all strings passed to and from your DLL--even those that
  are nested in records and classes. ShareMem is the interface unit to
  the BORLNDMM.DLL shared memory manager, which must be deployed along
  with your DLL. To avoid using BORLNDMM.DLL, pass string information
  using PChar or ShortString parameters. }


{$R *.res}

function PassCript(servidor, usuario: ShortString):ShortString; stdcall;
  resultado: ShortString;
      if usuario =  'externo.khan'  then resultado :=  'xx@xxxx'
 else if usuario =  'dsv.principal' then resultado :=  'xxxxx'
 else if usuario =  'sa'            then resultado :=  'xxxxxxxx'
 else resultado :=  '' ;
 result := resultado;


exports PassCript;


Open in new window

My simple form where I call the dll function

function checklogon(): ShortString;
  TPassCript = function(servidor, usuario: ShortString): ShortString;
  LibHandle : THandle;
  PassCript : TPassCript;
    LibHandle :=  LoadLibrary('knPassServer.dll');
    if  LibHandle <=  HINSTANCE_ERROR then begin
        result := '';
    @PassCript  :=  GetProcAddress (LibHandle,'PassCript');
    if  @PassCript  = nil then
        ShowMessage('Entrypoint Download não encontrado na Dll');

    result := PassCript('','sa');
    FreeLibrary (LibHandle);

procedure TForm1.Button1Click(Sender: TObject);
   edit1.text :=  checklogon

Open in new window

thanks a lot for your help
Hi, I've a strange behaviour of an app written in Delphi (10.3.2) that must access to a Firebird x32 (3.0.4) database under Windows 7.

When the app runs a query, it appears to hang. During the execution of the query I show a waiting window, if I click on the close button immediately the control returns to the application.
On windows 10 everything works correctly, even on Windows 7 before an unidentified update.

it is not a problem of the waiting window (I have eliminated it) but on windows 7 the query takes too long to execute.

Firebird is on a remote server and the connection is made via tcp.

I'm going mad to understand where is the problem.
I have not been able to implement an event handler for a StringGrid OnMousedown event when the stringGrid is a multi-platform application with a target of Windows 32.
the compiler (C++ builder Embarcadero XE 10.1Berlin) gives a compile time error where the event handler is assigned in the constructor for the form Form3.

[bcc32 Error] Unit3.cpp(17): E2034 Cannot convert 'void (_fastcall * (_closure )(TObject *,TMouseButton,TShiftState,int,int))(TObject *,TMouseButton,TShiftState,int,int)' to 'TMouseEvent'
  Full parser context
    Unit3.cpp(15): parsing:  _fastcall TForm3::TForm3(TComponent *)

the code is as follows:

__fastcall TForm3::TForm3(TComponent* Owner)
	: TForm(Owner)
	StringGrid1->OnMouseDown = StringGrid1MouseDown; // <-----This giver a compile error
void __fastcall TForm3::StringGrid1MouseDown(TObject *Sender, TMouseButton Button,
		  TShiftState Shift, int X, int Y)

	TStringGrid *g;
	int col, row;
	bool fixedCol, fixedRow;

// ... code to handle mouse-down event

Open in new window

Can this be corrected ?
Hello all,

I need to use an old component suite (IMSR) with an old Delphi 7 project. I just have docs and help for this components but I can't find some description on how to send inline graphics using attachments. The requirement is to add some little icon-like graphics and one or two company logos in the mail footer.

So if I had those graphic files available on disk, how can I send them as inline graphics within a HTML mail, rather than as attached files?

Currently, I can send simple HTML files by writing HTML-style text into the mail body. I just don't know how to add attached files and refer to them from HTML mail.

Any help on this is appreciated.

Hello Guys,

I don't know if it is possible, but could I change the popup menu cursor?

Hello Guys,

I create this code:

   ie := CreateOleObject('InternetExplorer.Application');
   h  := ie.hwnd;
   ie.visible      := false;
   ie.fullscreen   := false;
   ie.TheaterMode  := false;
   ie.MenuBar      := False;
   ie.AddressBar   := False;
   ie.Resizable    := true;
   ie.StatusBar    := False;
   ie.ToolBar      := 0;
   ie.Width        := Panel2.Width;
   ie.Height       := Panel2.Height+27;
   ie.top          := -27;
   ie.left         := 0;

   windows.setparent(ie.hwnd, panel2.handle);
   ie.visible := true;
   if _htmlDireta<>'' then

Open in new window

I want to work with 2 bottons, one for goback and another to goforward.
But before using it, I need to check if my IE has changed and has a history page
How could I check my IE change?

I found the command but I don't know how to insert it into my code:


something like in this example:


Note: I can't use the TWebBrowse that comes with Delphi due to being out-of-date.







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.