Questions tagged [delphi]

Delphi is a language for rapid development of native Windows, macOS, Linux, iOS, and Android applications through use of Object Pascal. The name refers to the Delphi language as well as its libraries, compiler and IDE which is used to help edit and debug Delphi projects.

0
votes
1answer
38 views

Why not tDataSet.Append automatically call Post

Delphi tDataSet.Append seems not to call Post. In its reference it says Dataset methods that change the dataset state, such as Edit, Insert, or Append, or that move from one record to another, ...
0
votes
0answers
58 views

How to get rid of dash error on Delphi MySQL query? [duplicate]

I am doing a SQL query on delphi like the one below: qryPessoas.Open('SELECT * FROM pessoas_login ' + 'JOIN pessoas ' + 'ON pessoas.id = pessoas_login.id_pessoa ' + 'WHERE cpf ...
-1
votes
1answer
72 views

Can anyone see whats wrong with with this?

Every time that I try to set the caption of this variable, it gives me "unspecified error" and I have concluded... I've tried to set the caption straight from the TADOQuery and by assigning the value ...
0
votes
0answers
37 views

Is there a way to double underline a TQRLabel with QuickReport 4?

I'm unable to double underline a TQRLabel which I'm using to display a sum. I already tried to draw the bottom frame of the TQRLabel and underline the font. But doing it that way the lines aren't the ...
3
votes
1answer
103 views

Delphi: fast stream to sha256 for large file (100 MB)

I have a function for generate the sha256 for a stream. This function take around 5 seconds for 100 MB FileStream. Any tips for make it faster? function GetStreamToHashSHA256Hex(const Content: ...
1
vote
1answer
79 views

Why is there no “encoding” attribute in a string got by “IXMLDocument.SaveToXML” method?

I use NewXMLDocument() to produce an XML document of my data. There is a SaveToXML() method to save the document to an XML-formatted string variable. The problem is that the XML string does not ...
0
votes
0answers
34 views

Setting a column on TZQuery.ParamByName

I need to run a SELECT statement where the column names are variable, as follows: query.SQL.Text :='SELECT A.:COLUMN '+ ' FROM A '; query.ParamByName('COLUMN').AsString :=...
1
vote
0answers
29 views

TimeOut property doesn't work on TRESTClient

I am working with Delphi 10 Seattle. Following samples we developed a REST Client that communicated with a remote server to consume Rest API. The REST Client works end until we tried to set a custom ...
-1
votes
0answers
54 views

How add total amount after export dataset NativeExcel? [on hold]

if anybody used this awesome vcl Native Excel I need your help. I have installed Native Excel Delphi XE3. This lib can export dataset to Excel nativly without excel installed. Question i have dataset ...
0
votes
2answers
93 views

Why is Spring4D's IList<T> OnChanged event not fired when the object changes (while Add and Remove fire the event)?

I modified @Stefan Glienkes example from Notify the TObjectList when Object changed to use IList, since I am using interfaced objects in my list. In the event handler, I can handle caAdded and ...
-1
votes
0answers
106 views

How to nest/embed a form inside another form

well, I am working with Delphi Rio and FastReports VCL 6 and I need to show the report's designer inside a Delphi Form. the report's designer is a form itself, and I managed to show the designer form ...
0
votes
0answers
46 views

DELPHI: Polymorph classes common function call [duplicate]

I will try to explain my problem with the well known TAnimal example. In my example i have a Combobox1 with 2 possible values: "cat" and "dog". I have a TCat and a TDog class inherited from TAnimal. ...
0
votes
1answer
72 views

How to logon from a Serviceapplication, without knowing Outlookversion (2010,2013,2016,etc) in advance

Im writing a Service-Application that should monitor one or more ExchangeMailboxes for incoming Mails to perform some action with those. The Service will run in different environments, which means i ...
-3
votes
0answers
79 views

Delphi devexpress VCL TCXComboBox red border around item

I have a Tcxcombobox with dropdownliststyle property set to IsFixedList, I am getting a red dotted line around the item when i go through the items in combobox and the same line appears around ...
0
votes
3answers
156 views

What is the difference between GetMem and AllocMem?

In Delphi, I see several similar functions that can be used to allocate memory, such as GetMem and AllocMem. What are the differences between them? I read the document and only find that GetMem will ...
2
votes
0answers
51 views

Delphi 10.2 TNetHTTPClient timeouts before its time

I set the ConnectionTimeout to 120000 (2 minutes) and the ResponseTimeout to 60000000 (1000 minutes). The server is a servlet written in Java and the session timeout there is 30 minutes. Despite the ...
1
vote
2answers
94 views

How to convert array of Byte to PByte in Delphi?

I'm using Delphi 5. I define an array of byte, as follows: Buffer: Array of BYTE; How to convert it to a PByte pointer?
2
votes
0answers
69 views

Getting a webservice to use a certificate

the title might be a bit off but I really didnt know how to put it in a title. The situation is as follows. There are 3 applications. 1. A stand alone windows application 2. A webservice that runs ...
3
votes
0answers
92 views

How to fix randomly dropping cookies (null) between Delphi and Java?

I am having a problem with null cookies being received on my Java back end when I can see they are not null and are being passed from my Delphi, Indy10, front end. This does not happen every time. ...
0
votes
1answer
93 views

The process won't wait?

the code i use is as below: begin saSecurity.nLength := SizeOf(TSecurityAttributes); saSecurity.bInheritHandle := True; saSecurity.lpSecurityDescriptor := nil; FillChar(...
0
votes
1answer
83 views

How do I insert new, unformatted, lines at the top of a TRichEdit

I am using TRichEdit to hold the body of an emailing client. I've given the user simple formatting capabilities (bold, italic, underline, left, centre and right paragraph alignment and bullets. This ...
-2
votes
1answer
106 views

Delphi Tokyo 10.2 needs rebuild of whole project after code update from repo

I have a really frustrating behaviour of Delphi Tokyo. I have moved from Delphi Xe7 and the other frustrating error (out of memory) is gone (or it seems till now), but a new one appeared. When I ...
0
votes
2answers
167 views

Dephi: faster way to convert a “dirty” string to a number

How can I make this code faster? the string can contain characters such as ", .?#" and possibly others. Const Nums = ['0'..'9']; function CleanNumber(s: String): Int64; Var z: Cardinal; begin for ...
0
votes
0answers
57 views

Call Delphi DLL Function from C# Question on the Marshalling of Data Type (array of char / array of integer)

Call Delphi DLL Function from C# Marshalling of Data Type (array of char / array of integer) delphi function type _InputPW = array[0..39] of char; _InputPW_Len = array[0..1] of integer; _OutPW ...
0
votes
0answers
69 views

Create anonymous procedure to field event in Delphi [duplicate]

I am trying to create a anonymous procedure to a OnSetText Field event. I know I can do it creating a separate procedure. But, I´d like to create it using anonymous procedure. I am trying the next, ...
0
votes
0answers
91 views

How to assign values to an array of objects in Delphi

I have an array of TBoek and and a loop that is supposed to assign values to each of the elements of the array. What happens instead is that the array ends up with the exact same values in each index. ...
0
votes
0answers
79 views

cannot create a file when that file already exists + logman start

I created data collector set from delphi code by using logman command. But not able to start data collector set by using logman start command. The start command results the following error cannot ...
0
votes
1answer
50 views

Delphi Android Oreo: How to start service in foreground?

I need to start a service for Android Oreo in foreground but I can't find an example how to do this in Delphi 10.3 for the app and for the service. I found hints that I have to use ...
1
vote
0answers
68 views

Adding reply text to an HTML email using TIdMessage

I had previously asked a question here. replace-cidimage-refrences-in-email-body The question came about because I am writing a basic email archiver/ archived email viewer. I had saved the body using ...
-3
votes
0answers
56 views

How to execute javascript page on twebbrowser? [on hold]

i am trying to navigate on https://ds.opap.gr/web_soccer/results.html with a twebbrowser and not succeed. I already tried silent = true and Registerasbrowser = true. I only get the black logo with ...
1
vote
1answer
58 views

How to count number of elements in a JSON array in Delphi

I am accessing a TJSONValue in Delphi(using REST components and Google Books' API). I want to know how many elements are in the array: 'items'. This is the format of the JSONValue: "kind": "books#...
1
vote
2answers
103 views

Delphi Array: Variable Myvar might not been initialized

I'm work on a program for school (Cinema app) but I have a problem with my array. My app closed but nothing is showed. program TFE; {$APPTYPE CONSOLE} uses SysUtils, StrUtils, Crt; var ...
-1
votes
0answers
54 views

Generics in TList - fill List and process Items depending on type

lets assume I have a generic class like this: TGenericClass <T> = class private fValue : T; FId : integer; public property Value : T read fValue write fValue ; property Id : integer ...
1
vote
2answers
81 views

Lazarus / Delphi - Create vs TSomeClass.Create inside constructor - why is this causing trouble?

Highlight This constructor: constructor TCoords.Create(const AX, AY: Integer); begin TCoords.Create(Point(AX, AY)); end; has been confirmed malfunctioning in both Linux Lazarus 2 and Windows ...
0
votes
1answer
98 views

Printer ignoring paper color changes

I am using a brother label printer which depending on the paper set to use It may or may not be able to print in color (paper 62mm X 100mm let you use color but 29mm X 90mm only allows monochrome). ...
8
votes
1answer
138 views
+50

In the integrated debugger is there an implicit variable for exceptions

I would like to examine the exception in the debugger. When I have except on e:exception do This is trivial, I can just examine the e variable But, many exception handlers do not have an on e:...
1
vote
0answers
65 views

How to create HTTP Header for eBay Browse API Function

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=' +...
-2
votes
0answers
66 views

Move from ADO to FireDAC framework

How to use refind to remove TADOConnection ConnectionString property from dfm? How to use refind to move TADODataset locktype property with ltReadOnly value to TFDQuery UpdateOptions readonly property ...
1
vote
0answers
55 views

Change small icon in push notification on Android with Delphi XE 10.3 Rio

I have a problem with the small icon in push notification on Android devices. The icon shows black. I have followed the steps indicated by pudnivec74 in this post How to change small icon image in ...
0
votes
1answer
62 views

Delphi FMX Verify if EditText contains Numbers Only?

I need to use different procedure depending on the Edittext.text i need to call ProcessA(value: string); with Parameters of last 4 Char of string if Edittext.text's first 4 char are string and next 4 ...
1
vote
1answer
96 views

Delphi/Lazarus | Is there a way to simplify global OnMouseEnter event handling?

Problem I would like to simplify the following code in Delphi XE6 on Windows, which becomes unmaintainable as I am adding more and more types of components. Portability note: I would like to use the ...
3
votes
1answer
108 views

Why is this procedure not a TProc?

I have a situation like the following: interface type IMyInterface = interface [GUID] procedure MyProcedure; stdcall; end; TMyOBject = class(TInterfacedObject, IMyInterface) ...
0
votes
0answers
54 views

Removing meta generator MSHTML

When I read the contents of the HTML page generated using TWebBrowser (design mode) for example using this code: function GetHTML(w: TWebBrowser): String; Var e: IHTMLElement; begin Result := ''; ...
1
vote
1answer
71 views

Join Multiple Images IN FMX?

In VCL this is how i make a single image from two images while creating space between them: procedure TForm2.Button1Click(Sender: TObject); var p1,p2:string; b1,b2:TBitmap; bitmap: TBitmap; begin ...
0
votes
2answers
105 views

Delphi go up a directory using ExtractFilePath

I'm using this code: str := ExtractFilePath(ParamStr(0)) + '\Connection.ini'; to get the path of an .ini file, but I want to go up by 2 directories, so the .ini file doesn't sit in the DEBUG folder. ...
-3
votes
0answers
90 views

How i make my programe Compatible with all screen sizes? [closed]

After finishing my project (simple program with delphi),I had a problem with the screen resolution, My screen is up to 1024x768 the program is good, but the client screen reaches (1280x102) When I run ...
0
votes
1answer
39 views

Assigning a font to a TRichEdit after setting background colour for selected text

I have a TRichEdit control on my Delphi form, and I'm assigning a background colour to certain parts of the text using the perform method to send a windows message to the control. (Text is selected ...
0
votes
1answer
79 views

What could cause SHGetFolderLocation to return false with Lasterror set to 59?

I have an application that sometimes fails to obtain the path for the AppData folder. The situation seems only to occur on our Citrix server farm and not for every user and not all the time (I was ...
0
votes
0answers
94 views

seperate Tstringlist in Delphi

I want to separate a string list by events, see below list. Event: DialBegin Privilege: call,all Channel: PJSIP/1177-00000638 ChannelState: 4 ChannelStateDesc: Ring CallerIDNum: 1177 CallerIDName: IT ...
0
votes
0answers
55 views

[FireDAC][Phys][Ora]-314. Cannot load vendor library [/usr/lib/ems/libclntsh.so] - Delphi RAD Server on Ubuntu

After installing Delphi 10.3.1 RAD Server (EMS modules) in Ubuntu Server 18.04 LTS , I deployed and tested a simple (with no database access) Delphi RAD Server application and it worked fine. When ...

http://mssss.yulina-kosm.ru