Delphi

59K

Solutions

12

Articles & Videos

16K

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

Hi!

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.
0
[Webinar] Learn How Hackers Steal Your Credentials
LVL 9
[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Hello,

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) 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.

Can someone help please ?
0
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.
0
ICapture want to color by alternating a group of line DBGRID according to the reference (RefBac) if the reference changes the color change (blue / white / blue / white ...) is it possible ? if it's possible how can i do this ? or it is what it is Possible to separate the groups of rows with each change by a bold line? you find a capture of the result that I want to have
Capture.PNG
0
brwser.wb1.OleObject.document.GetelementbyiD('zip').Setattribute('value', names[i]);
brwser.wb1.OleObject.document.forms.item(1).submit;

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.
0
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...

const
  URL = 'https://api.bulksmsgateway.in/send/?username=****&hash=****&sender=TXTLCL&numbers=9198........&message=HISUNDAR';
  //URL = 'https://api.textlocal.in/send/?username=*****&hash=******&sender=TXTLCL&numbers=9198...&message=HISUNDAR';
  ResponseSize = 1024;
var
  hSession, hURL: HInternet;
  Request: String;
  ResponseLength: Cardinal;
begin
  hSession := InternetOpen('TEST', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
  try
    Request := Format(URL,[Username,Password,Sender,Numbers,HttpEncode(Message1)]);
    hURL := InternetOpenURL(hSession, PChar(Request), nil, 0,0,0);
    try
      SetLength(Result, ResponseSize);
      InternetReadFile(hURL, PChar(Result), ResponseSize, ResponseLength);
      SetLength(Result, ResponseLength);
    finally
      InternetCloseHandle(hURL)
    end;
    showmessage(result);
  finally
    InternetCloseHandle(hSession)
  end





var
http : TIdHTTP;
IdSSL : TIdSSLIOHandlerSocketOpenSSL;
begin
 http := TIdHTTP.Create(nil);
 IdSSL := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
 try
  Http.ReadTimeout := 30000;
  Http.IOHandler := IdSSL;
  IdSSL.SSLOptions.Method := sslvTLSv1;
  Http.Request.BasicAuthentication := True;
 // IdSSL.SSLOptions.Method := sslvTLSv1;
  …
0
Hi!

I have an Android App written in Delphi Seattle.
The app won't be available on Google Play: I will deliver the Apk file to the user.

I would like to be able to restrict the number of devices per user (so each more device usage would cost a small sum of money)...

How can I do that?

Thank you.
0
Bonjour,
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

Somme:=0;
DataModule1.Ouvraison.First;
DataModule1.Ouvraison.Edit;
Vax := DataModule1.Ouvraison.fieldByName('RefBac').value;
                  while (not DataModule1.Ouvraison.EOF)   do
                  begin

                     If(DataModule1.Ouvraison.FieldByName('RefBac').Value= Vax ) then
                     begin
                     DataModule1.Ouvraison.Edit;
                     Somme:=Somme+DataModule1.Ouvraison.fieldByName('NbRebut').value;
                     DataModule1.Ouvraison.Post;
                     DataModule1.Ouvraison.next;
                     end
                     else
                     begin
                     DataModule1.Ouvraison.Edit;
                     DataModule1.Ouvraison.fieldByName('PCS NOK').value := …
0
Im not a programmer so please bear with me.... i need help filtering time in my report...

the code the im using is
[rmdAttAbnormite."StartTime"]

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
8.png
0
Hello,

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
Mac
0
Free Tool: SSL Checker
LVL 9
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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 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?
0
Hello.

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:

uses
  MSHTML;

procedure TBrowserPageIE.Test;
var
  doc : IHTMLDocument3;
  el  : IHTMLElement;
  v   : OleVariant;
begin
  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);
      end;
    end;
  end;
end;

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

Have you some idea to fire events??

Thanks.
0
I have the code:

Type
  TButton = Class (stdctrls.TButton)
  protected
    procedure Click; Override;
  end;

Procedure TButton.Click;
Begin
  Enabled := False;
  Inherited;
  Enabled := True;
End;

(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?

Thanks.
Claudio
0
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;
begin
Result := False;
  SMTP := TIdSMTP.Create(nil);
  SSLHandler := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
  try
    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.gmail.com
    SMTP.Port := StrToInt(vPort);//587;
    SMTP.Username := vUserId;
    SMTP.Password := vPwd;
    SMTP.UseTLS := utUseExplicitTLS;
    SMTP.ConnectTimeout:=1000000;
   

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

    end;
  end;
 
    try
    SMTP.Connect;
    SMTP.Authenticate;
    if SMTP.Connected then
        Result:=True;

    except
    on e: Exception do
    begin
    Result:=False;
      MessageDlg('Cannot connect to SMTP server: ' + sLineBreak + e.Message, TMsgDlgType.mtError, [TMsgDlgBtn.mbOK], 0);…
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
0
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;

interface

uses
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;

type
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
{ Private declarations }
public
{ Public declarations }
end;

var
ScanForm: TScanForm;

//QR Barcode
device: pansichar;
proc : zbar_processor_t;
symbol:zbar_symbol_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: …
0
É 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?
0
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?
0
In a large Delphi application, I call, at the beginning of the execution, several functions and procedures part of a DLL (I wrote it as well).
One of the last thing the main does before pausing for user action is to call MessagDlg to display a welcome message to the user.
Well, MessageDlg does not display anything at that time.
There is just a short beep when it executes (debug mode) and nothing appears...
0
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!

Hello, I'm using this component to make my system and I came across a problem when sending a post to a certain form where I have to post a captcha code, simply by sending the post to that url, the html returned is like a one GET, because the error message does not come informing the wrong code, it simply does not post the information, I only have a problem on this page, all the others managed to work, get it and posts, I need help in this part!
0
i would like a delphi  program of compression lz78 (i use tliste and byte).

thinks
0
I use Delphi 10 Seattle and i want to read Reg_multi_sz using below code... but i found diferent result...

added uses registry;

procedure addextshow;
const
  CKeyName: string = 'SOFTWARE\Policies\Microsoft\Windows\safer\codeidentifiers';
  CValName: string = 'coba2';
var
  keyGood: boolean;
  p: integer;
  tmpStr: AnsiString;
  vSize: integer;
begin
with Form1 do begin
  reg := TRegistry.Create;
  try
    reg.RootKey := HKEY_LOCAL_MACHINE;
    keyGood  := reg.OpenKey(CKeyName, False);

    if (keyGood) then
    begin
      vSize := reg.GetDataSize(CValName);
      if (vSize > 0) then
      begin
        SetLength(tmpStr, vSize);
        reg.ReadBinaryData(CValName, tmpstr[1], vSize);
        repeat
          p := Pos(#0, AnsiLowerCase(tmpStr));
          if p <> 0 then
          begin
            Delete(tmpStr, p, 1);
            Insert(#13#10, tmpStr, p);
          end;
        until p = 0;
        ListBox1.Items.Text:=AnsiUpperCase(tmpStr);
       ListBox1.Items.Delete(ListBox1.Items.Count-1);
      end;
    end;
  finally
    reg.Free;
  end;

end;
end;

So........ true result is in delphi 7,,, and D 10 there are some character..
like attached picture

how to fix this?
or above code was wrong ?

thankyou beforeResult reg_multi_sz
0
How to check if url contains any parameters or not in delphi web application
0
IBQuery1.sql.Clear;
   sql:= 'select * from osapuolet where o_ovtTunnus is not null ';
   if gbMain then
   begin
         sql := sql + ' and O_MasterUser= :no';                                                                         // Giving error
         IBQuery1.Params.paramByName('no').AsString := gsParPKey;                            // Giving error
   end;

   // jos hakusana, niin hakuehto lisätään sql-lauseeseen
   if length(request.contentfields.Values['hakusana']) > 0 then
   begin
      sHakusana:= request.contentfields.Values['hakusana'];
      while Pos('*',sHakusana) > 0 do
         sHakusana[Pos('*',sHakusana)] :='%'; // korvataan jokerimerkki
      sql :=sql + ' and UPPER(';
      case iSortKentta of
           0: sql := sql + 'O_OvtTunnus ';
           1: sql := sql + 'O_Nimi ';
           2: sql := sql + 'O_KTunnus ';
           3: sql := sql + 'O_Liittymispvm ';
      end;
      sql :=sql + ') Like ' + ''''+ UpperCase(sHakusana) +  '''';
   end;
   // lajittelujärjestys
   sql:= sql +' order by ';
   case iSortKentta of
     0: sql := sql + 'O_OvtTunnus ';
     1: sql := sql + 'O_Nimi ';
     2: sql := sql + 'O_KTunnus ';
     3: sql := sql + 'O_Liittymispvm ';
   end;
   case iSortTapa of
     0: sql := sql + 'Desc ';
     1: sql := sql + 'Asc ';
   end;

   if gbT then s:= '<br>' +sql;
   IBQuery1.SQL.Add(sql);
   IBQuery1.Open;




Have added "no" parameter but giving me error as :
IBQuery1: Parameter 'no' …
0
IBQuery1.sql.Clear;
   sql:= 'select * from osapuolet where o_ovtTunnus is not null ';
   if gbMain then
   begin
         sql := sql + ' and O_MasterUser= :no';                                                                         // Giving error
         IBQuery1.Params.paramByName('no').AsString := gsParPKey;                            // Giving error
   end;

   // jos hakusana, niin hakuehto lisätään sql-lauseeseen
   if length(request.contentfields.Values['hakusana']) > 0 then
   begin
      sHakusana:= request.contentfields.Values['hakusana'];
      while Pos('*',sHakusana) > 0 do
         sHakusana[Pos('*',sHakusana)] :='%'; // korvataan jokerimerkki
      sql :=sql + ' and UPPER(';
      case iSortKentta of
           0: sql := sql + 'O_OvtTunnus ';
           1: sql := sql + 'O_Nimi ';
           2: sql := sql + 'O_KTunnus ';
           3: sql := sql + 'O_Liittymispvm ';
      end;
      sql :=sql + ') Like ' + ''''+ UpperCase(sHakusana) +  '''';
   end;
   // lajittelujärjestys
   sql:= sql +' order by ';
   case iSortKentta of
     0: sql := sql + 'O_OvtTunnus ';
     1: sql := sql + 'O_Nimi ';
     2: sql := sql + 'O_KTunnus ';
     3: sql := sql + 'O_Liittymispvm ';
   end;
   case iSortTapa of
     0: sql := sql + 'Desc ';
     1: sql := sql + 'Asc ';
   end;

   if gbT then s:= '<br>' +sql;
   IBQuery1.SQL.Add(sql);
   IBQuery1.Open;




Have added "no" parameter but giving me error as :
IBQuery1: Parameter 'no' …
0

Delphi

59K

Solutions

12

Articles & Videos

16K

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.