delphi-10.3-rio

How PixelsPerInch works in Delphi 10.3 Rio?

£可爱£侵袭症+ 提交于 2021-02-11 16:51:45
问题 I do not understand what is the purpose of PixelsPerInch property... It seems it is useless. If Scaled is checked, PixelsPerInch cannot be modified. If Scaled is unchecked and PixelsPerInch is changed, the form size an font is scaled to a fixed value, regardless of the value you entered in PixelsPerInch field. Of course, I checked the form size at runtime. 回答1: Scaled is True In the dfm file the PixelsPerInch property contains the screen DPI value used when the form was designed. This is

View content ot TRESTRequest before sending?

余生颓废 提交于 2021-02-11 12:32:09
问题 So if I have prepared a REST Request, is there a way that I can view the output of it before sending for debugging purposes? So: LRequest.Client := LClient; LRequest.Method := rmPOST; LRequest.Resource := AUTH_PATH; LRequest.Accept := 'application/json'; // required parameters LRequest.AddParameter(ExCode, AuthCode, pkGETorPOST); LRequest.AddParameter(ExRedirectURI, RedirectionEndPoint, pkGETorPOST); LRequest.AddParameter(ExGrantType, ExAuthorizationCode, pkGETorPOST); LRequest.AddParameter(

LowLevelKeyboardProc() never is executed

回眸只為那壹抹淺笑 提交于 2021-02-08 10:40:37
问题 I'm need hook my keyboard and found the following code (reference here) that i want use in a Delphi Console project. Happens that after the first test i noted that LowLevelKeyboardProc() function never is executed ( hello never is displayed on console window). Already SetWindowsHookEx() is working fine and returning <> 0. Then someone can help me to solve this problem please? program Project1; {$APPTYPE CONSOLE} {$R *.res} uses Windows, Messages, SysUtils; function ToUnicodeEx(wVirtKey,

No OnKeyDown event for Return key on Delphi Android 10.3.3

倾然丶 夕夏残阳落幕 提交于 2021-02-07 11:01:27
问题 I am in the process of upgrading from Delphi 10.2.3 to 10.3.3. My android apps are now not generating an OnKeyDown event from the virtual keyboard for the Return key. I have confirmed this using a very basic newly created project so it is nothing to do with the conversion from 10.2.3 it seems. Any ideas would be appreciated. QA at embarcadero have come back with the following response: "According to this documentation - Handle keyboard actions or this - KeyEvent : When handling keyboard

No OnKeyDown event for Return key on Delphi Android 10.3.3

半腔热情 提交于 2021-02-07 11:01:16
问题 I am in the process of upgrading from Delphi 10.2.3 to 10.3.3. My android apps are now not generating an OnKeyDown event from the virtual keyboard for the Return key. I have confirmed this using a very basic newly created project so it is nothing to do with the conversion from 10.2.3 it seems. Any ideas would be appreciated. QA at embarcadero have come back with the following response: "According to this documentation - Handle keyboard actions or this - KeyEvent : When handling keyboard

Basic authentication with HTTPRIO in Delphi 10.3

空扰寡人 提交于 2021-02-05 07:11:08
问题 There has been a change to the HTTPRIO.HTTPWebNode.OnBeforePost event in Delphi 10.3. Before Delphi 10.3, the event handler was defined this way, and it worked perfectly: procedure TForm1.HTTPRIO1HTTPWebNode1BeforePost(const HTTPReqResp: THTTPReqResp; Data: Pointer); var auth: String; begin auth := 'Authorization: Basic ' + IdEncoderMIME1.EncodeString('user:password'); HttpAddRequestHeaders(Data, PChar(auth), Length(auth), HTTP_ADDREQ_FLAG_ADD); end; In Delphi 10.3, the Data parameter is gone

How to detect specific (timeout) errors for THTTPReqResp SOAP requests?

 ̄綄美尐妖づ 提交于 2021-01-28 11:39:27
问题 In Delphi Tokyo 10.2.x a ESOAPHTTPException was an Exception descendant with a StatusCode property set in the creator: ESOAPHTTPException = class(Exception) private FStatusCode: Integer; public {$IF CompilerVersion <= 15.0} constructor Create(const Msg: string; SCode: Integer = 0); {$ELSE} constructor Create(const Msg: string; SCode: Integer = 0; Dummy: Integer = 0); {$IFEND} constructor CreateFmt(const Msg: string; const Args: array of const; SCode: Integer = 0; Dummy: Integer = 0); property

FireDAC Query dropping special characters in SQL statement to SQL Server

你离开我真会死。 提交于 2021-01-28 08:13:24
问题 I have hit this issue off and on in Delphi 10.3 using FireDAC and the EMS Rad Server. I have not experienced it in Delphi 10.2 or below, but I am not using FireDAC anywhere but in Delphi 10.3. The issue I am experiencing is some special characters seem to be getting stripped out of the SQL statements before they reach the Database. For example, if I run: update messageread set MessageDeliveredDateTime = '8/11/2020 6:33:45 PM' where messageread.dts in ('5/7/2020 12:48:20 PM-!+[[786', '5/7/2020

How to load an icon from resources to a TImage?

筅森魡賤 提交于 2020-12-26 10:38:51
问题 I try the following code and it's not working... LoadIconWithScaleDown returns a negative error code. unit Unit1; interface uses Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.StdCtrls; type TForm1 = class(TForm) Image1: TImage; procedure FormCreate(Sender: TObject); procedure LoadResToImg(RID: String; const Img: TImage); end; var Form1: TForm1; implementation {$R *.dfm} {$R UserResources

Connection timeout with TNetHTTPClient and Delphi 10.3

风格不统一 提交于 2020-12-06 16:25:47
问题 I try to set a 6 s connection time out for non responding sites, on a TNetHTTPClient with : NetHTTPClient1.ConnectionTimeout := 6000; But it doesn't work, the timeout seems always the same default ( about 1 mn) Am I missing something with the ConnectionTimeout or with my code ? Edit : OK, my mistake, for this tests I used a (bad) proxy and it was the proxy which was not responding. So it seems that the ConnectionTimeout is not efficient in case of not responding proxy. I will post mode code