Delphi

59K

Solutions

17K

Contributors

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 have two mediaplayers in one form, how to get low volume in one mediaplayer and still high in other? Help me
0
Free Tool: Path Explorer
LVL 12
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.

Hello,

I use Delphi Seattle.
Can it connect to WAMP?
Further information here: http://wamp-proto.org/

I need to connect with a Multi Device Application to a system which uses WAMP

Thank you.
0
I am attempting to write contact information from a delphi application to an outlook address book.
I can get the address books, but can't figure out how to write to an address book, as all the samples I am seeing used the default contact folder only.


I can get the default contact folder as well, but user doesn't want to use the default contact folder, they want to use a custom address book.
is this even possible?
0
Hello,

I have a serious problem.
I use Delphi Seattle and Windows 10 on a notebook.

I need to work on this notebook for a month. Because the screen is very small I bought a big monitor and attached it  as a secondary monitor.

When I start Delphi I move it to the big monitor.
Every time I run my application (F9) it automatically moves back to the first, small monitor.
Because I am testing my new application a lot half of my time goes by setting back the Delphi to my big monitor.

How can I prevent it?
Thank you very much.
0
Hello everyone,
I'm using Timer to upload data to my table paradox every day but when i close the application the table become empty(it can be closed because of the shutdown of the computer all of a sudden) , i want to keep my table full  , any solutions please.
I'm using Delphi 7 and paradox 9 thanks.
0
In my Delphi project for Windows, I often render Japanese text on TCanvas of an image. Unfortunately, the vertical position of the rendered characters depends on the font family. When the font is MS Mincho or MS Gothic, it's positioned perfectly well. When it's Tahoma, the text goes a bit down. When it's Yu Mincho or Kozuka Gothic, it goes down a lot. So it's really difficult to align the text for all possible fonts. I need to calculate some parameter for every font to move the position upwards.

Some experts from another forum recommended to use the parameters from TTextMetric. There are several: tmAscent, tmDescent, tmExternalLeading, tmInternalLeading, etc. Theoretically, a certain combination of them and the font size in pixels should give me the desired value. But whatever I tried didn't work so far.

There must be a way to do it. Any ideas?
0
Hello guys

I have a function where I can set a print to as a default print.

Now I need to get the way to change the paper layout of it, I have a paper developed and I want to change it when I will print
a doc. Do you know any function or way to get that?


It is interesting that I can list all paper from my default printer with this function but I haven't found any way to set the paper with its name.

procedure TForm1.ListPaper;
var
  HPrinter: THandle;
  Forms: array of TFormInfo1;
  Count, Needed, Returned: DWORD;
  i: Integer;
begin
  Memo1.Clear;
  if OpenPrinter(nil, HPrinter, nil) then begin
    try
      if not EnumForms(HPrinter, 1, nil, 0, Needed, Returned) then begin

        // we should fail here since we didn't pass a buffer
        if GetLastError <> ERROR_INSUFFICIENT_BUFFER then
          RaiseLastOSError;

        Count := (Needed div SizeOf(TFormInfo1)) + 1;
        SetLength(Forms, Count);
        if EnumForms(HPrinter, 1, @Forms[0], SizeOf(TFormInfo1) * Count, Needed,
            Returned) then begin
          if Returned < Count then
            SetLength(Forms, Returned);
          for i := 0 to Returned - 1 do begin
             Memo1.Lines.Add(Format('Paper name: %s,   Paper size: %dmm x %dmm',
                            [Forms[i].pName,
                             Forms[i].Size.cx div 1000,
                             Forms[i].Size.cy div 1000]))
          end;
        end else
          RaiseLastOSError;
      end;
    finally
 

Open in new window

0
Hello,

I wrote an Android App in Delphi.

I noticed the some applications are installed directly under root directory e.g. /sdcard/AnkiDroid or /sdcard/doubleTwist.
However my app is installed somewhere else (I think /sdcard/Android/data).

How can I change it? Or if I can't how can I make the installation make a folder in the root directory?
I need the user to copy a file there so as my app would parse it.

Thank you very much!
0
Hi.

I need to print a report (a simple pricelist), with some images (4 images for 4 pages ) before printing the nomal pricelist report.

Which is the best method?

Thanks!
0
I use Delphi and want to send SMS via the COM Ports + Mobile phone combination.
I am using the AT+ commands but I get SMS which includes the commands. I want only the message to come.
Sample SMS

AT+CMGF=1AT
AT
AT
AT+CMGF=1

AT
+CMGS="nnnnnnnnnnn"

Open in new window

0
Free Tool: Site Down Detector
LVL 12
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

I am using below code successfully via VCL, but FMX does not recognise HBITMAP.
I want to use below code via FMX to resize Bitmaps.

procedure TForm9.ScaleBitmap(Source, Dest: TBitmap; OutWidth, OutHeight: integer);
var
  src, dst: TGPBitmap;
  g: TGPGraphics;
  h: HBITMAP;
begin
  src := TGPBitmap.Create(Source.Handle, 0);
  try
    dst := TGPBitmap.Create(OutWidth, OutHeight);
    try
      g := TGPGraphics.Create(dst);
      try
        g.SetInterpolationMode(InterpolationModeHighQuality);
        g.SetPixelOffsetMode(PixelOffsetModeHighQuality);
        g.SetSmoothingMode(SmoothingModeHighQuality);
        g.DrawImage(src, 0, 0, dst.GetWidth, dst.GetHeight);
      finally
        g.Free;
      end;
      dst.GetHBITMAP(0, h);
      Dest.Handle := h;
    finally
      dst.Free;
    end;
  finally
    src.Free;
  end;
end;

Open in new window

0
Hi,

Below part of some VB.Net code is shown. It is used to interface data to an online application via SOAP.
The full code can be downloaded here
First some info: Code from de WDSL:
    function CreateStamTabelRecord(const PartnerKey: string; const Omgevingscode: string; const SessionId: string; const Stamtabel: Stamtabel; var Primarykey: string; var Foutmelding: string): Boolean; stdcall;

Open in new window

  Stamtabel = class(TRemotable)
  private
    Fschema: TXMLData;
  public
    destructor Destroy; override;
  published
    property schema: TXMLData  Index (IS_REF) read Fschema write Fschema;
  end;

Open in new window


Can anybody translate the following VB-code to Delphi?
The content of ds_mutatie is important to be correct. How should this be created within Delphi?
Private Sub btnCreateNewDeb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateNewDeb.Click
        If String.IsNullOrEmpty(txtSessionId.Text) Then MsgBox("SessionId is leeg.") : Exit Sub

        Select Case combometh.SelectedItem
            Case "SOAP"
                Dim ws1 As New ws1.ws1
                Dim foutmelding As String = ""
                Dim ds_records As New DataSet

                Dim ds_mutatie As New DataSet
                Dim dt_selection As DataTable = ds_mutatie.Tables.Add : dt_selection.TableName = "METADATA"
                dt_selection.Columns.Add("TABLE", 

Open in new window

0
I have a base form and multiple other forms which are visually inherited from the base form.
There is a tdxbar component on the base form with 4 groups tdxnavbargroup.

I need one additional group in just one of the inherited form so should I add in the base form or just the inherited form?
0
Experts
What is best option in below scenario
I have two Delphi apps app1 and app2, they have their own data modules say dm1 and dm2 respectively.
Now I actually was running app2 from app1 hence there was no issue in accessing an query component placed in dm1 from a common frame being used by both apps.
Now I need to run app2 as standalone and it throws exception at a line where it sees the reference to query component of dm1.

So I have used ifdef conditional directives but is there any other solution?
0
I have coded a Windows 32 VCL application using Embarcadero C++ builder  EX10.1 Berlin and using a winsoft TOBR barcode recognition component.
The application worked.
I now wish to no longer use the Winsoft component in the application so I removed it from the project entirely,including the library and the obr.hpp header file.
The project now compiles but I get a linker error that the file OBR.OBJ cannot be found when the project no loger uses the component as far as I can see.
Where is the linker getting the reference to OBR.OBJ from or how can I get rid of the error ?

The ilink32 command line is as follows :

  c:\program files (x86)\embarcadero\studio\18.0\bin\ilink32.exe -G8 -L.\Win32\Debug;"c:\program files (x86)\embarcadero\studio\18.0\lib\Win32\debug";
  CivicWeldRESTServer;"c:\program files (x86)\embarcadero\studio\18.0\lib\win32\release";"c:\program files 
  (x86)\embarcadero\studio\18.0\lib\win32\release\psdk";C:\Users\Public\Documents\Embarcadero\Studio\18.0\DCP -j.\Win32\Debug;"c:\program files 
  (x86)\embarcadero\studio\18.0\lib\Win32\debug";CivicWeldRESTServer;"c:\program files (x86)\embarcadero\studio\18.0\lib\win32\release";"c:\program 
  files (x86)\embarcadero\studio\18.0\lib\win32\release\psdk";C:\Users\Public\Documents\Embarcadero\Studio\18.0\DCP -l.\Win32\Debug -C -v 
  -GA"C:\Users\roger\AppData\Local\Temp\vfs7F41.tmp"="C:\Users\roger\Documents\Embarcadero\Studio\Projects\FrameStatusWebServerV2\WebModuleUnit1.dfm" 
  

Open in new window

0
I have to use unit shareMem for accessing dll-procedures with string-params. Now, when I execute the application on a computer without borlndmm.dll I get an error that this file is missing. How can I embed this (I thing with a runtime-package, but which one?)?

Delphi XE 10.1

Thanks, Peter
0
Hello,

Got some problems with cloning client datasets. Aggregate works after a cloning if the Aggregate active is first turned off and then back on, but if there is a Grouping level, no. It will stay blank. I checked the property of the index and of the aggregate field; both Grouping level's are still 1 after the clone and it works as is should until i clone...
0
I am getting a linker error when compiling an application with Embarcadero C++ Builder XE10.1 .
The application is a 32 bit windows VCL application (Web application). I can usually fix the error by re-booting the PC and running the compiler before any other application but recently this doesn't fix the problem.
The PC is a Dell precision 7710 with an Intel i7 2.7 Ghz processor and has 32 GB of RAM. the operating system is Windows 7 Professional 64 bit.
Looking around on the web, the issue would appear to be a buggy Embarcadero Linker which isn't going to be fixed any time soon.
Is there any solution to this ?

I have added the following option in the C++ Linker Additional options:   -GHtds=0x0F000000 and have also checked the  "clear state before linking" box in the C++ linker advanced options, neither of which actions has had any effect.

Any help appreciated.

Roger
0
Hello guys,

I would like to trigger a function when I click on a label with ctrl key pressed. How to fire the trigger after doing that?

You can give me a simple example with showmessage('pressed!') after clicking on a label with ctrl pressed.

thanks
Alex
0
Receive 1:1 tech help
LVL 12
Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

can udp server send data to a specific client that are on the same ip and port ?

i know that udp is connectionless but is there a way to send data to some clients based on some string matches ?

here is my client and server code


Server
unit UDPSRV;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, IdBaseComponent, IdComponent, IdUDPBase,
  IdUDPServer, IdGlobal, IdSocketHandle, Vcl.StdCtrls;

type
  Tudpservfrm = class(TForm)
    udpserver: TIdUDPServer;
    Button1: TButton;
    Button2: TButton;
    Edit1: TEdit;
    Memo1: TMemo;
    procedure udpserverUDPRead(AThread: TIdUDPListenerThread;
      const AData: TIdBytes; ABinding: TIdSocketHandle);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
    procedure UpdateBindings;
  public
    { Public declarations }
  end;

var
  udpservfrm: Tudpservfrm;

implementation

{$R *.dfm}

procedure Tudpservfrm.Button1Click(Sender: TObject);
begin
 UpdateBindings;

 udpserver.Active := true;
end;

procedure Tudpservfrm.udpserverUDPRead(AThread: TIdUDPListenerThread;
  const AData: TIdBytes; ABinding: TIdSocketHandle);
begin
//
//memo1.Lines.Add(bytestostring(AData) + ABinding.PeerIP + ' : ' + intTostr(ABinding.PeerPort));
Athread.Server.Send(ABinding.PeerIP, ABinding.PeerPort, bytestostring(AData));





end;

procedure Tudpservfrm.UpdateBindings;
var
Binding: TIdSocketHandle;

Open in new window

0
We plan to begin coding (Delphi 10.x) application for smartphone, in a first stage, accessing the customer database, the smartphone being connected to the customer local network.
It seems I have two alternatives : Direct access or REST/HTTPS layer.
Is there some documentation explaining advantages and disavantages of both methods ?
0
Hello,

Some program have stolen my alt-F12, according to some software its "system debugger" whatever that is. I need Alt-F12 for my delphi IDE. Looks hard to change hotkeys in Delphi and even harder to identify and get back a hotkey. Any suggestions?
0
I am writing a windows Web application using embarcadero XE10.2 Berlin C++ builder;
The application uses a TWebModule and receives a POST web action from a web page being displayed on a remote mobile device.
the mobile device posts a jpeg image which Is received in the following function, st2 is a TMemoryStream.
I am copying the raw content into a TByteDyneArray b so that I can easily inspect it. I load the TMemoryStream with the raw content and then save the memory stream to a file with the extension .jpg.
This file is reported as corrupt or invalid or too long when I try to open it with windows Photo viewer or the like.
how do I extract the image data ?
The size of the raw data as given by  Request->RawContent.Length is
Inspection of the beginning of the raw content  up to encountering a NULL is shown in quotes below.
"------WebKitFormBoundary9lWvgPDQcTZoDcRf\r\nContent-Disposition: form-data; name=\"picture\"; filename=\"15123250544981385201258.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n�￘�£\x02tExif"

void TWebModule1::Action3Post(TWebRequest *Request,TWebResponse *Response)
{
	UnicodeString u,v,uu="";
	TByteDynArray b;
	char buff='a';

	int n,m,w;
	u = Request->ContentType;
	n = Request->RawContent.Length;
	m = Request->Files->Count;
	b = Request->RawContent;
	st2->Clear();
	b.set_length(n);
	st2->WriteData(Request->RawContent,Request->RawContent.Length);
    st2->Position = soBeginning;

//	Form1->Memo1->Lines =  Request->ContentFields;
	for(;;)
	{
		

Open in new window

0
how do i draw an image inside a column ? as example inside coulmn 2 ?
0
Hello
Can you help me please!!! i have this message when i run my project
"Débordement de pile".
Thanks
0

Delphi

59K

Solutions

17K

Contributors

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.