Delphi

“Listener” for detect changes on mouse icon

百般思念 提交于 2020-01-05 05:40:06
问题 I seen here a code that retrieves the current icon of mouse as string, but this code had uses a TTimer for make it. So, i want know if exist some event (Listener) for detect these change on mouse cursor icon. Below is code that uses a TTimer : const HighCursor = 13; type TForm1 = class(TForm) Timer1: TTimer; Label1: TLabel; procedure FormCreate(Sender: TObject); procedure Timer1Timer(Sender: TObject); private FCursorHandles: array [0..HighCursor] of HCURSOR; public end; var Form1: TForm1;

Firemonkey blocking dialogs on Android

岁酱吖の 提交于 2020-01-05 05:32:27
问题 I am porting an older project (app for iOS ans Android) for a customer from an older AppMethod version to the newest RAD Studio version (10.0 Berlin). MessageDlg and similar were used often in the project but this does not work anymore. The apps shows a message, that modal dialogs are not supported on Android. I know and understand why this is so for the Android platform ( so please don't mark this question as a dublicate by referencing to an explanation - I'm asking for something else! ).

Could not Create Output file in Delphi 10.1 Berlin

泪湿孤枕 提交于 2020-01-05 05:29:04
问题 When running my Delphi Project for the first time , it runs with no error. But the subsequent runs produces an error below: [dcc32 Fatal Error] F2039 Could not create output file '.\Win32\Debug\Project1_p.exe' I tried enabling my application Experience and setting it to automatic, as stated here with no luck. How to fix this permanently? Im using Delphi 10.1 Berlin. UPDATE 1: I know deleting the .exe, checking whether the executable is still running in the task manager and killing the process

Not receiving WM_NCHitTest on title bar

删除回忆录丶 提交于 2020-01-05 05:26:09
问题 I noticed that the message WM_NCHitTest isn't sent to a form when the cursor is inside the caption bar (not on the border). I tried to intercept it using either procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; or procedure WndProc(var Message: TMessage); override; According to MSDN I was expecting to receive it for any point, with no blind spots. Did I miss something or this is the intended behaviour? I'm using Delphi 2010 on Windows 7, with Aero on. 回答1: Yes -- that's

FMX Style issue with modal forms

老子叫甜甜 提交于 2020-01-05 05:24:07
问题 I'm developing a multi-device application for iOS and Android using Delphi XE7 Update 1. I have a base form from which all forms in my application are driven: object frmBaseForm: TfrmBaseForm Left = 0 Top = 0 Caption = 'Form1' ClientHeight = 480 ClientWidth = 640 StyleBook = sbStyle FormFactor.Width = 320 FormFactor.Height = 480 FormFactor.Devices = [Desktop] DesignerMasterStyle = 0 object sbStyle: TStyleBook Left = 8 Top = 8 ResourcesBin = {

I need some info about dBase field types

会有一股神秘感。 提交于 2020-01-05 04:31:05
问题 I need to store an array of words and bytes (and some other data) in a TDBF database (this DB is compatible with dBase). But I don't know the meaning of the field types this DB is using. For example what can I store in a file of 'Array' type or 'TypedBinary'? From where I can get some dBase IV documentation? 回答1: I realized that the constants used by TDBF are actually defined in DB.PAS (borland). It seems that TDBF is not so compatible with dBase. Update: Due to lack of documentation I

How is right to format and validate edit control to accept only float or currency values

五迷三道 提交于 2020-01-05 04:30:18
问题 I have a application that needs to accept float or currency values in edit control. My question is what I must to do to format and validate edit controls input so it accepts only numbers, comma or dot (comma or dot depends on system locale). And the formatting is ##.## (45.21). I want to do one method that can control all edit controls wehre float formatting and validating is used. Right now I have code in OnChange event that uses TryStrToFloat method, but sometimes I get "'' is not floating

delphi component property: TObjectList<TPicture>

吃可爱长大的小学妹 提交于 2020-01-05 04:16:22
问题 I'm trying to create a VCL component, that lets you insert multiple TImages of different sizes as properties. I was told to best use a TObjectList ( Delphi component with a variable amount of TPictures ), but now I'm struggling to make the single TPictures assignable in the Property editor . What i have at the moment: (it compiles) unit ImageMultiStates; interface uses Vcl.Graphics, Vcl.StdCtrls, System.SysUtils, System.Classes, Vcl.Controls, Vcl.ExtCtrls, Forms, Generics.Collections; type

How to create HTTP Header for eBay Browse API Function

落花浮王杯 提交于 2020-01-05 03:38:09
问题 I am trying to get a Product Review Rating through eBay's Browse API. Here is my code for this function: sHeaders := TStringList.Create; sHeaders.Add('X-EBAY-C-ENDUSERCTX=' + '"affiliateCampaignId=' + '533xxxxxxx"'); objIdHTTP.Request.CustomHeaders.AddStdValues(sHeaders); sResponse := objIdHTTP.Get('https://api.sandbox.ebay.com/buy/browse/v1/item/v1|123456789|0'); But I get a Socket Error 10054 when I test this code. It might be something wrong with the customer header part, but I can't

Delphi GDI+ DrawString Transparent From Left and Right

落爺英雄遲暮 提交于 2020-01-05 03:31:54
问题 I have problem drawing text transparent from left and right like this example: Image1: What i have done so far: var linGrBrush: TGPLinearGradientBrush; Text : String; x, y : Single; Begin Graphics.Clear(0); linGrBrush := TGPLinearGradientBrush.Create(MakePoint(0, 0), MakePoint(300, 0), MakeColor(0, 0, 0, 0), MakeColor(255, 255, 0, 0)); linGrBrush.SetBlendTriangularShape(0.8); Text := 'Transparent Text From Left And Right'; x:= 0; y:= 0; Graphics.DrawString(Text, Length(Text), Font, MakePoint