[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

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

Hello,

I have a device, camera that connects to wifi and transmits the video via wifi. How can I read this video buffer from this device using Delphi Desktop application and display the video in this desktop app? Via ethernet LAN connection. Using TCP read buffer? But how to read the right buffer exactly from this particular device? Please show me some code.

Imagine this scenario. I have a video surveillance  camera transmitting video via wifi in country A and I want to see the video in country B. Via LAN.

Regards, Bogomil
0
Exploring SharePoint 2016
LVL 12
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Hi

I have the following code in Delphi XE 10.1, compiling with 32bit:
type
  TEditStream = record
    dwCookie: Longint;
    dwError: Longint;
    pfnCallback: TEditStreamCallBack;
  end;

function EditStreamCallback(dwCookie: Longint; pbBuff: PByte; cb: Longint; var pcb: Longint): Longint; stdcall; stdcall;
var
  MS: TMemoryStream;
begin
  // dwCookie is Application-defined,
  // so we're passing the stream containing
  // the formatted text to be added.
  //
  MS := TMemoryStream(dwCookie);
  Result := 0;
  with MS do
  begin
    if (Size = Position) then
    begin
      pcb := 0;
      Exit;
    end
    else if (Size - Position) <= cb then
    begin
      pcb := Size;
      Read(pbBuff^, Size);
    end
    else
    begin
      pcb := cb;
      Read(pbBuff^, cb);
    end;
  end;
end;

function REFetchText(RE: TRichEdit; const Text: AnsiString): integer;
var
  ES: TEditStream;
  MS: TMemoryStream;
begin
  MS := TMemoryStream.Create;
  try
    MS.Write(Text[1], Length(Text));
    MS.Seek(0, soFromBeginning);
    ES.dwCookie := Longint(MS);
    ES.dwError := 0;
    ES.pfnCallback := @EditStreamCallback;
    if Pos('{\rtf', Text) > 0 then
      Result := SendMessage( RE.Handle, EM_STREAMIN, SF_RTF or SFF_SELECTION, Longint(@ES))
    else
      Result := SendMessage(RE.Handle, EM_STREAMIN, SF_TEXT or SFF_SELECTION, Longint(@ES));
  finally
    MS.Free;
  end;
end;

Open in new window

if I compile and run it for 64bit I get an accessviolation on "SendMessage". I think the problem are some parameters but how to do?
Thanks, Peter
0
I work with Delphi Rad seattle 10.
My program needs to get the real date from the internet.
It would be better if could get the date from the server of my site
I am using FireDac which  enables me to connect to external server.
0
I need to convert a Date Time from our sql server to a date time format that includes UTC offset like "2018-10-05T12:00:00-05:00" that supports daylight savings time.  I am sure there is a function to do this, but I can't seem to ask google the right question to find it.
0
I wish to update my Android SDK/NDK  tools on Embarcadero RAD Studio 10.2 from SDK API 34 (Android version7) to SDK API 28 (Android version 9).
several videos on U-tube show how to install Android tools into the IDE using Gettit but in my list of Gettit packages, Android development tools is missing ?

Is there a way to update the SDK/NDK using RAD Studio ( C++ builder) ?
0
I just moved from Delphi XE7 to Delphi 10.2 and have problems with IdHTTP.Get.
It doesn't seem to work in Delphi 10.2 the way it used to in Delphi XE7.
I am getting Error 500: failed to serialize the response body
0
I am looking to click on a line in a tiff file and color the line with a color.
See this video https://grantfullen-yahoo.tinytake.com/sf/Mjk3MzEwOV84OTE3ODU4
Looking for a solution in Delphi Community Edition.
This is a schematic and the ideal is to click on a line  go from junction to junction ( BLACK DOT) in the schematic.
The schematics will always be black and white.
0
How can I Color or underline or Bold Memos  only in current record  or create some kind of ruller on Preview form in Fastreport and Delphi
to easy follow  row after row
0
Hi.
I have many problem to run a .bat (with a 'start cmd /c myapplication.exe' ) from a service. I have try ShellExecute but i have myapplication.exe running in background and never appears. My appilcation.exe is an APPTYPE CONSOLE.

I have try:
ShellExecute(0, 'open', 'c:\mydir\my.bat', nil, nil, SW_SHOWNORMAL) ;
or similar but this don't work!

I know that is difficult to execute a visual application from a service.
Can someone help me?

Windows 10
RAD Studio 10.2

Thanks in advice.
0
On a TForm I have a TComboBox component
I want to programmatically "click" on it so that the user has to select an item in the list
TComboBox.Click is refused by the compiler
Any other way ?
0
Introduction to R
LVL 12
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

In my Delphi application, I have a TMemo on a form
I put some text in it, but quiet long (wordwrap = true)
That's not a problem, user can go down in the text but sometimes the beginning of the text is not shown at the top right of the TMemo
How can I have text visible from the beginning of it
0
I have two forms shown in my application
Says FormA and FormB
How can I programmatically do to have FormB becoming visible when it is "behind" FormA ?
Thanks
0
On a TForm I have a TMemo
I fill in the TMemo lines with some text (variable) (wordwrap is true)
I want to programmatically adapt the height of the form so that the entire text is visible (no scrollbars and anchor is adapted)
Thanks
0
I want to move from FTP to HTTPS due to Firewalls being nasty to FTP.
For HTTPS I will need a SSL Certificate.
   Can I get free valid certificates anywhere ?
   Should I distribute my certificates while deploying my Application ?
I use Delphi (ICS HTTPS component) and my application runs on Win OS.
I have developed a backup application which is installed on every machine of my customers.
The HTTP Server will only be installed on the Destination machines and monitoring machine.
0
I´m  installing Delphi 5 Application on virtualbox running windows XPSP3. This old application use MDB database. Now I´m facing this error when starting the App.
Invalid configuration parameter on ALIAS: DATABASENAME

How can I solve it ?
0
Using Delphi XE8 I get errors all the time when compiling a project:

1. [CreateAndroidManifestFile Warning] android:hardwareAccelerated attribute not found. Please review AndroidManifest.template.xml
2. [PAClient Error] Error: E2312 Unable to execute '"C:\Users\Public\Documents\Embarcadero\Studio\16.0\PlatformSDKs\android-sdk-windows\build-tools\21.1.2\Aapt.exe" package -f -M "D:\myprograms\NEW\Delphi\Test\Android\Debug\Clicked\AndroidManifest.xml" -F "D:\myprograms\NEW\Delphi\Test\Android\Debug\Clicked\bin\Clicked-unsigned.apk" -I "C:\Users\Public\Documents\Embarcadero\Studio\16.0\PlatformSDKs\android-sdk-windows\platforms\android-21\android.jar" -S "D:\myprograms\NEW\Delphi\Test\Android\Debug\Clicked\res" -A "D:\myprograms\NEW\Delphi\Test\Android\Debug\Clicked\assets" "D:\myprograms\NEW\Delphi\Test\Android\Debug\Clicked\library" "D:\myprograms\NEW\Delphi\Test\Android\Debug\Clicked\classes"' (Error 1)

[PAClient Error] Error: E2312 D:\myprograms\NEW\Delphi\Test\Android\Debug\Clicked\AndroidManifest.xml:1: error: Error parsing XML: not well-formed (invalid token)

How to solve the problems with this Manifest XML? I didn't input Api keys and all other keys at testing stage. What needs to be done to get rid of this Manifest problems?

Thanks for help.
0
What is the best way to communicate between a Windows Service application and a UI Application within the machine.
Currently I am writing into a SQL lite database and reading every second in both applications.
My Service application has Socket Communication for inter machine, I do not want Sockets on UI (to avoid Firewall blocking).
IPC at times gives problems when the users are different (Local System and Standard user)
I use Delphi Seattle on Windows
0
Hi Experts,
I would like to track the number of pages printed via a printer.
Ther are multiple printers installed, including pdf printer.
I need to get the number of successfully printed pages (number of copy / number of pages) from a specific printer.
Documents are printed by Fastreport . Have you any delphi example, how to realize this?
Thanks in advance, Tom
0
Hello,

I have an FMX application.
I have a problem with anonymous method, please share your strategy, how to workaround this.

I would like to use this as:

If  MyFunction1 <>'' Then
  MyProcedure2;

.....

Function MyFunction1:String;
Begin
  MyForm:=TMyForm.Create(Nil);

  With MyForm Do
   Begin
      Query1.Sql.text := 'select * from xxx;'
      Query1.Open;
     ....
     showing the query in grid etc.
   End;

  MyForm.ShowModal(
   procedure(ModalResult: TModalResult)
   begin
     if ModalResult = mrOK then
      Begin
         // Here I need to give back the autoincrement field of the selected record, but how? Result is not available here

      End;
   end);

End;

Thank you very much for your help!
0
CompTIA Cloud+
LVL 12
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

I have been using Delphi 7 in Windows 10 for quite awhile.

I use ESET Internet Security as my anti-virus/anti-malware protection.

A recent update in ESET has caused problems with D7 - when I run a program from the IDE, the program never starts - it appears as though ESET is blocking the "integrated debugger" from attaching to the process.

I can disable all protection and everything works.

I'm looking for alternate solutions - something I might be able to add as some type of exception rule in the anti-virus to allow the integrated debugger to work.

Is the integrated debugger actually "integrated" in delphi32.exe, or is it called by the IDE?  That is, is there a DLL or exe that can be identified as exception to anti-virus program?

TIA.

EdB
0
I have a backup program during which I want to avoid backup of 'Recycle Bin' , 'C:\Windows\' etc.
I get all the special folders using SHGetSpecialFolderPath but I cannot get Recycle Bin ( CSIDL_BITBUCKET) .
I know it is a virtual folder but I need it specific to a Drive say for C: or D: etc
SHGetSpecialFolderPath  for CSIDL_BITBUCKET returns ''
0
Hello,

I have a Delphi project (Delphi Seattle) which uses a dbf file as a resource.
It works very well.
I use this code:

RF_SaveResourceAsFile('Dbf_abc', 'RT_RCDATA', ExtractFilePath(ParamStr(0)) + 'abc\' + 'ABC.DBF');
....
procedure RF_SaveResourceAsFile(const ResName: string; ResType: pchar; const FileName: string);
begin
  with TResourceStream.Create(hInstance, ResName, ResType) do
   try
     SaveToFile(FileName);
   finally
     Free;
   end;
end;

Open in new window


However I have a new project which needs exactly the same function.
But here when I want to use I get "Resource Dbf_abc not found" exception.

This is what I did:
-I added the resource to the project (I tried to to this both from Resources and Images and manually , editing the .rc file)
-I included the resource
 ( I  tried {$Resource myprogram.RES} and {$R 'myprogram.res' 'myprogram.rc'} both at the dpr and the main.pas (separately and together)

What am I missing? If I open the .res file I can see the definition of the dbf file so it was compiled ....

Thank you very much!
0
how could i make Twsocket send strings in utf-8 encoding using sendstr ?
0
I am trying to debug a custom component by using delphi to do it.

using : Delphi Tokyo 10.2.2, Windows 7.



this is my component source:

unit pvDBLookupCombo;

interface

uses
  System.SysUtils, System.Classes, Vcl.Controls, System.UITypes,
  RTLConsts,
  cxControls, cxContainer,
  cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit, cxLookupEdit, cxDBLookupEdit,
  cxDBLookupComboBox, strUtils, variants
  , Data.DB;

type

  TProVDBLookupEditProperties = class(TcxLookupComboBoxProperties)
  private
       fSearchSQL : tStringList;
  public
    constructor Create(AOwner: TPersistent); override;
  published
     property ClearKey default 27;
     property GridMode default true;
     property ImmediatePost default True;
     property ValidationOptions default [evoRaiseException, evoShowErrorIcon];
    property SQL : tStringList read fSearchSQL write fSearchSQL;
  end;

  TProVDBLookupComboBox = class(TcxDBLookupComboBox)
  private
    { Private declarations }
//     FSearchKind: TSearchKind;
     fIsRequired : boolean;
     fSearchDataSource : tDataSource;

  protected
    { Protected declarations }
//    procedure DoOnNewLookupDisplayText(const AText: string);override;
  public
    { Public declarations }
      constructor Create(AOwner: TComponent); override;
      class function GetPropertiesClass: TcxCustomEditPropertiesClass; override;
  published
    { Published declarations }
    //property searchKind : tSearchKind read fSearchKind write fSearchKind;
    

Open in new window

0
Hi,

I want to add optional two-factor authentication during login into my Delphi win32 application.
Using: Delphi 10.1 Berlin Enterprise
User logs in using normal username and password. On his mobile phone he receives an authorisationcode which he needs to enter in the application.

What would be the easiest way to set this up?
A very basic example would be appreciated.
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.

Top Experts In
Delphi
<
Monthly
>