Questions tagged [delphi]

22591 questions
1

votes
2

answer
2.9k

Views

F2063 Could not compile used unit 'QuickPDF0724.pas'' error in Delphi XE4

I have included QuickPDF0724 unit in uses in one of my pas file. I have give the path of this unit in Tools --> Options. But I am getting the error: "F2063 Could not compile used unit 'QuickPDF0724.pas'" In the path mentioned of that unit, only dcu file is there, no pas file. Same code is working fi...
1

votes
1

answer
5.3k

Views

importing an excel file to datagrid on delphi

I've tried this code on .NET -to import an excel file to devxpress datagrid- and it worked fine but i have to create a procedure doing the same job on delphi now. i dont know much about delphi so i need some ideas how to do that. public static DataTable ImportExcelXLS(string FileName, bool hasHeader...
user2764568
-1

votes
0

answer
25

Views

Appending Binary Files Delphi

I am trying to create a fileuploader backend where I receive the uploaded file in chunks of 10 000 000 bytes max. var FileTo, FileFrom: File; Buffer: array [1 .. 1000] of Byte; RecordsRead: Integer; begin FileMode := fmOpenReadWrite; AssignFile(FileTo, ToFilePath); Reset(FileTo, 1); try AssignFile(F...
Daniel Venter
1

votes
2

answer
1.4k

Views

How to store string in stream in Delphi 7 and restore on mobile app in XE6?

I develop a server and a mobile client that communicate over HTTP. Server is written in Delphi 7 (because it has to be compatible with old code), client is mobile application written in XE6. Server sends to client stream of data that contains strings. A problem is connected to encoding. On the serv...
tikskit
1

votes
2

answer
373

Views

Filtering non-Typeable characters in unicode

In an old application programmed under Delphi 6 (non-Unicode platform), i used to filter out non-typeable characters simply by referencing their cell numbers in the ANSI character table ( if (aKeyChar in [#32..#254]) then.... ). Now that i shifted into Delphi 2010 where the platform is Unicode based...
Johny
1

votes
1

answer
239

Views

Reuse TFloatAnimation Delphi XE5

Put a FloatAnimation a button and the application panel, the button onClick put the FloatAnimation1.enabled: = true; and the animation runs normally, but if I click on the button again the animation does not run again. Ie I need the component FloatAnimation run whenever I click the button and not ju...
Anderson Nunes
1

votes
2

answer
1.9k

Views

Command Line Args in pascal

Hi I am new in pascal I have a program which gives result .... I need to pass command line input in in given variable ip1 and ip2. Its can be achieved by ParamStr[1] but its not works please help me. Thanks in advanced!!!!! program main; var output : integer; var ip1 : integer; var ip2 : integer...
Nirbhav Gupta
1

votes
2

answer
913

Views

How do I render text along an arc in an image?

I have the following code in Delphi 7 to draw Copyright text along the curved edge of a DVD. We are using an old version of Graphics32. We are switching to Delphi XE5 with the latest code from Graphics32 and this code no longer compiles; in particular LoadArcCurve and drawingBuffer.RenderFittedText...
Hobo Joe
1

votes
2

answer
183

Views

Recieving error 80004005 on COM dll registration

I have a Delphi COM dll which works perfectly on several machines. However when I try to register it on one Windows 7 box I get the following error DllRegisterServer failed with error code 0x80004005 I have tried the obvious solutions around ensuring that the correct supporting libraries are regist...
Toby Allen
1

votes
1

answer
368

Views

Auto refresh of UI control

I have a problem while using delphi. In my UI, I have a label and 5 bottons. Clicking of the 5 buttons can change some status, which would affect the label caption. The OnClick function of the 5 buttons have already implemented. So I need to add code to change to label caption in each of these func...
dltigles
1

votes
2

answer
1.7k

Views

How to make a indy HTTPServer in console application

i'm trying to do a HttpServer with Delphi 7/indy(9) component (console application, without Forms/Application): UPDATE: A Full console example with infinite loop. program httpserver; {$APPTYPE CONSOLE} uses IdHTTPServer, IdTCPServer, IdCustomHTTPServer; Type TCommandHandler= class protected procedur...
Tralala Lala
1

votes
1

answer
177

Views

Why TForm's _release does not call destructor?

Why TForm's _release method does not call destructor? var F, U : IUnknown; procedure TForm1.btn1Click(Sender: TObject); begin U := IUnknown(TMyObject.Create); // MyIterfacedObject (inherits TInterfacedObject) F := IUnknown(TMyForm.Create(nil)); end; procedure TForm1.btn2Click(Sender: TObject);...
Astronavigator
0

votes
0

answer
3

Views

Styling an TCustomControl descendant results in gray background labels

In a following control I use TLabel as up and down buttons. When I choose "Cobalt XEMedia" as a default project style, these labels are drawn with a gray background. "Windows", "Cobalt XEMedia" and "Obsidian": Please help to draw the background of the label with the same color as the form, as depict...
Paul
1

votes
2

answer
1.9k

Views

Delphi Indy Attachments not working

I have an App that needs to do some FTP uploads from a network drive. I am using Indy for this. Then, when a file is located on the network drive and successfully uploaded to the FTP server, I want to email this same file to a colleague. I am using the code below to do this. The email gets sent fin...
1

votes
1

answer
162

Views

What is the equivalent of ? in MatchesMask of delphi in regular expression?

Delphi's MatchesMask documentation says this about ? (emphasis mine): Wildcards are asterisks (*) or question marks (?). An asterisk matches any number of characters. A question mark matches a single arbitrary character. My question: is ? in MatchesMask equivalent to . in regex? Or is it equivalent...
Sнаđошƒаӽ
1

votes
1

answer
615

Views

Resize images and save output

I see many questions/Answers about resizing images here on SO. But I can't find the correct one that fit my case. In this post, it works only when you want to have a small image from a big one. However if you have a picture with 24x24 dimension and you want to resize it to 256x256 dimension, the pro...
Sami
1

votes
1

answer
68

Views

How to save values from a table into another table delphi

I am using delphi rad studio and i am a beginner in this. I am trying to insert values into a table from another table which contains just IDs. I have some comboboxes filled with ID's from a table and then i want to insert these values into another table. To be more specific i have a table that cont...
Burtea Lorena
0

votes
0

answer
4

Views

How do I get a second descendant of TTreeViewItem to show on the TreeView

Using Delphi 10.3 and Fmx, how do I get the second descendant of TTreeviewItem to show its text ? The first descendant works fine. The second one (T3) always shows blank. In this sample the "Parent" and "Text" are assigned correctly to the Item. But in my project the parent will not get assigned...
Rohit Gupta
0

votes
0

answer
17

Views

Shell folders notifications and icons

I'm looking for someone with experience in windows shell to give me a few hints. I'm making a simple shell+filesystem folders browser using delphi 2010, and it's partially functional, but i have a couple of issues (for now). The code is a bit too large to post and i'm not sure which parts are releva...
miodrag
0

votes
2

answer
19

Views

Get installed application list

Is it possible to get currently installed application list on an Android phone? Currently I have tried to check if the app is installed which it is, but I need to get all of the installed applications in a StringList function TForm2.IsAppInstalled(const AAppName: string): Boolean; var PackageManage...
Peturz
1

votes
3

answer
266

Views

Delphi - can a property read from a property?

So I just joined this forum because I could not find an answer to my simple question. I want to declare a read-only property, and it should read from a private members read-only property. It seems like that won't work. Can I work myself around that blockade? Here is the code snippet: property Mine:...
Steve-Fiction
1

votes
0

answer
7

Views

How implement connection and data transfer between Client/Server sockets and a SSH tunnel?

Then, my original project is a remote administration tool (client => server (controller) ) that have several features like file manager, conversation (chat with client pc) between others. The communication today is made using sockets (TClientSocket and TServerSocket) without any protection of data....
Davison
1

votes
1

answer
772

Views

How crop bitmap in selected area using firemonkey?

I need create a crop effect to my app. I have a TRectangle over a TImage, and I need when the user press the save button, copy just the area that the TRectangle uses. There is some way that I can cut just a specific area from the Image1.Bitmap? I printed a image to better ilustrate what I need:
Diego Bittencourt
1

votes
1

answer
58

Views

How to sign Delphi application on macOS under ssh session from windows machine?

I am building Delphi firemonkey application on Windows for macOS and deploying on macOS. Now to publish the app, I need to codesign it under macOS. I would like to ssh from Windows machine under macOS as the part of shell script and codesign mac build and publish it.
Sergiy Tytarenko
4

votes
2

answer
172

Views

Why delphi BoolToStr true is represented as -1

Delphi function BoolToStr converts boolean value to a string. The result is either true or false, or 'numeric', '-1' and '0' respectively. Why -1 and not 1?
Doege
1

votes
2

answer
1.1k

Views

Array parameter for TADOQuery in Delphi 2010

I need to execute a simple query: SELECT * FROM MyTable WHERE Id IN (:ids) Obviously, it returns the set of records which have their primary key 'Id' in the given list. How can I pass an array of integer IDs into ADOQuery.Parameters for parameter 'ids'? I have tried VarArray - it does not work. Para...
Dingo
1

votes
2

answer
426

Views

Override the Tab control for a single Object

I found this code to override it for an entire class: { Private declarations } procedure CMDialogKey(Var Msg: TWMKey) ; message CM_DIALOGKEY; procedure TForm1.CMDialogKey(var Msg: TWMKey); begin if (ActiveControl is TEdit) and (Msg.Charcode = VK_TAB) then begin // end else inherited; end; procedure...
Eszee
-1

votes
0

answer
16

Views

How start my application automatically (without use regedit or service) to all users when Windows start? [duplicate]

This question already has an answer here: How do i find the path to startup folder? 1 answer What is the path for the startup folder in windows 2008 server 3 answers I want know how execute my application to all users automatically when system is started, without need of write in any entry of rege...
Davison
1

votes
2

answer
242

Views

Changing background image in TeeChart Delphi XE8 at run-time

I would like to use the gallery pictures (Metal, Wood, Stone, Clouds, etc.) which are available at design time under Chart/Panel/Image/Gallery. If I set it at design time, I can easily disable it at run time with: g.backImage := nil; But if I want to set it to a particular value, e.g. with g.backIma...
ZioBit
5

votes
3

answer
261

Views

Why uninitialized pointers cause mem access violations close to 0?

It is said that often (but not always) when you get an AV in a memory location close to zero (like $89) you have an uninitialized pointer. But I have seen this also in Delphi books... Hm... or they have been all written by the same author(s)??? Update: Quote from "C++ builder 6 developers guide" by...
Rigel
2

votes
3

answer
360

Views

What is the difference between .Create and .Create() in Delphi?

I'm following along in Pawel Glowacki's Expert Delphi book. On page 98 he has the following onClick event handler: procedure TFormFavJSON.btnReadDOMClick(Sender: TObject); var favs: TFavorites; valRoot: TJSONValue; objRoot: TJSONObject; valFavs: TJSONValue; arrFavs: TJSONArray; begin favs := TFavo...
0

votes
0

answer
10

Views

Convert string to currency, convert str to decimal and multiply these two and convert back to currency

I am trying to convert the string in the editboxes in delphi 2010: 1 from currency (price per gallon) and 2 (number of gallons) and then multiply these two numbers and convert back to string. I have searched on line, this forum to no available I always the the error: "Not a floating point value" I h...
K Boykin
1

votes
0

answer
20

Views

How execute a batch file via ShellExecute api from application created by service?

I have a simple vcl form app that is executed on NT AUTHORITY\SYSTEM account via service app, and have a batch file that will finalize "service.exe" and vcl app.exe and after, delete they, to execute batch file i'm using ShellExEcute(). procedure TForm1.Button1Click(Sender: TObject); begin ShellExec...
Davison
1

votes
1

answer
1.4k

Views

Delphi Runtime Error 105 at 0040423F

I currently have a question for Delphi.Every time when i want to run the program it shows me this problem:Runtime error 105 at 0040423F. Here is the picture of it and the program behind it:
LuXuS
0

votes
0

answer
14

Views

Accessing JSON data after Indy POST

I am struggling to know how to access the response to an Indy POST request. I post the data either as JSON or paramstring. My code when using JSON is as follows. params := TStringList.Create; try params.Text := '{' + format ('"client_secret":"%s",', [FilesFrm.ClientSecret]) + format ('"client_id":"%...
Bob Evens
0

votes
0

answer
4

Views

FMX Delphi ComboBox Sorted not present

I need to sort a ComboBox on FMX receive a message error: "undeclared identifier" var c: TComboBox; c.sorted := true; //Error undeclared identifier On VCL work fine. thanks for help Giorgio
Giorgio
1

votes
2

answer
600

Views

How to shift data in array?

///Example some_array[0]:=0; some_array[1]:=1; some_array[2]:=2; some_array[3]:=3; some_array[4]:=4; And now I need to shift values in array like this (by one cell up) some_array[0]:=1; some_array[1]:=2; some_array[2]:=3; some_array[3]:=4; some_array[4]:=0; Is there any build in procedure or I have...
Atak_Snajpera
1

votes
2

answer
493

Views

delphi How to change at runtime a firemonkey user style text sub-property

I created a style like this: Then I create a TLayout inherited component named TLieu My goal is to instantiate it at runtime and change: Image property, Title.Text property, Informations.Text property, Map, Infos, Link buttons My code, but it's not working: Procedure TF_Main.Button1Click(Sender: TOb...
ffert2907
1

votes
2

answer
2.5k

Views

Delphi decimal separator issue

My application works on system with regional settings where decimal separator is comma. (Delphi 10.1) I have set dot as decimal separator for my application . Application.UpdateFormatSettings := false; FormatSettings.DecimalSeparator := '.'; Application.UpdateFormatSettings := true; This works fine...
poonam
1

votes
2

answer
774

Views

Label font resizing when form resizes

I am trying to get it so when I resize a form the labels on that form resize accordingly.For what is worth the resize will only occur when the 'WMExitSizeMove' procedure triggers. Edit: I would prefer a scale aproach which wont resize beyond or beneath the constraints Ideally what I would like is to...
Eddy

View additional questions