Posts by Andrey • 1,884 points
98 posts
-
0
votes1
answer38
viewsQ: Calling Createparams from an inherited component
I have a component inherited from a Tedit. I already have an override of the CreateParams and by default it has the following parameters: Params.Style := Params.Style or WS_CLIPCHILDREN or…
-
4
votes4
answers3002
viewsA: How to store Memo content in variable string in Delphi?
sHTML := Memo1.Text; So it will work, now if you need something else, specify in the question.
-
1
votes2
answers749
viewsA: Delphi - how to treat delete in the master-Detail relationship?
It’s possible, but I don’t recommend it. I don’t really recommend working with Tables, is very tied and limits quite a lot of technical aspects that can be improved in the application. But that’s up…
-
2
votes1
answer235
viewsA: Add values to cells in Stringgrid
First, you must enable the option goEditing in Options Stringgrid; Then, in the onKeyDown event, add the code (With ENTER): if key = 13 then begin if StringGrid.Col < (StringGrid.ColCount - 1)…
-
4
votes1
answer330
viewsA: Concatenate Sqlquery loop result
var linhas: string; begin FDQuery1.First; while not FDQuery1.Eof do begin linhas := linhas + FDQuery1.FieldByName('nome').AsString + ', '; FDQuery1.Next; end; end; As far as I understand your…
-
2
votes1
answer594
viewsQ: Rounding out with Formatfloat
When trying to round to 4 decimal places the value 18,36735 by means of the function Formatfloat, the system generates the value 18.3673. How is this possible? It should not round up the value,…
-
3
votes1
answer255
viewsQ: Abort the execution of a long-term SQL
I have a very time consuming SQL (more than 10 minutes) to return the data. However, he is executed in a Thread and therefore the Mainthread continues to run normally. While SQL is running, the user…
-
0
votes2
answers963
viewsQ: Pass Ifddatasetreference (Firedac) to Clientdataset.Data
I have a Query of Firedac (Fdquery) and want to pass its result to a Clientdataset. Since Firedac works with Ifddatasetreference and the Clientdataset work with Olevariant, of the compatibility…
-
2
votes0
answers40
viewsQ: Drag Treeviewitem to Form
I’m putting together a project with Firemonkey. In this, I want to drag a Treeviewitem into the empty form area and then run other options... The famous DragDrop. I’m not able to do it and I haven’t…
-
3
votes1
answer1107
viewsA: Infinite loop with "While not Cds.Eof’s"
With the help of Reginaldo’s comments, I’ve come up with a solution. In the Afterscroll, before executing the Edit / Post, make a if, checking whether the dataset is not as EOF. if not Cds.Eof then…
-
3
votes1
answer1107
viewsQ: Infinite loop with "While not Cds.Eof’s"
I have a while not Eof normal in a Clientdataset. The only detail is in Afterscroll, where I edit the dataset in question and I give a post in the same. When the Eof is True, after the post he…
-
1
votes2
answers1031
viewsA: How to count down in a Messagebox
Another alternative is to use the function Messageboxtimeout. It is native to Windows, although it is not documented in Unit Windows.. Details of its use can be found on the website itself…
-
0
votes3
answers3378
viewsA: How to generate firemonkey android PDF report?
I suggest the Fastreport, because a basic version already accompanies the Delphi and the complete (paid) versions are spectacular. Fastreport FMX…
-
1
votes1
answer1410
viewsA: Invalid Pointer Operation - Delphi
Create the fields as follows (size is a variable integer): for i := 0 to cdsAux.FieldCount -1 do begin tamanho:= cdsAux.Fields[i].Size; if (cdsAux.Fields[i].DataType = ftString) and (tamanho = 0)…
-
2
votes2
answers498
viewsA: Writeln Locking in Delphi Seattle
As commented, simply remove the parameter mArchive of function Rewrite and it will work.
-
2
votes1
answer102
viewsQ: SQL abstraction with Firedac
I would like to know how best to work with abstraction of SQL in a multi-bank system. For example: Firebird: SELECT SUBSTRING(nome FROM 5 FOR 8) FROM clientes Oracle: SELECT SUBSTR(nome,5,8) FROM…
-
1
votes0
answers105
viewsQ: Confirm Inputquery with only one Enter
I’m using a Inputquery to enable the user to have quick access to other parts of the system. The problem is that the process is to give agility and press twice the key Enter goes against the…
-
0
votes2
answers431
viewsA: Create Login screen at runtime
Take a certain shape yes... It would be through the InputQuery or InputBox. It is true that these features only provide a field for filling, but you can look at the source code of these functions…
-
4
votes1
answer408
viewsQ: Send email by calling Outlook 2013
To send emails use the function Sendemail: function SendEMail(Handle: THandle; Mail: TStrings): Cardinal; type TAttachAccessArray = array [0..0] of TMapiFileDesc; PAttachAccessArray =…
-
4
votes2
answers205
viewsQ: Alert p/o programmer when opening Form (Designer)
When a programmer opens a specific form, I would like to send a notification (ShowMessage()) even for it to pay attention, for example, to the comments that are in the file header .pas in question.…
-
2
votes3
answers722
viewsA: Count in Firebird 3.0 Bigint X Firebird 2.5 Integer
Buddy, if you’re using the FireDAC, there is a very plausible solution. It’s called MapRules, more information you can find on link. With this technology, you can tell the system to treat a field…
-
0
votes1
answer87
viewsQ: Set font color in cell in Broffice
I export data from a report to an electronic spreadsheet, depending on what the user has installed on the machine, to Excel or for the BrOffice. My question is when coloring the source of a cell in…
-
0
votes1
answer780
viewsA: Export report to PDF
All comments were helpful, but the best way I could find to export my reports to PFD was through the library Synopse (SynPDF). It is very powerful and easy to use. In my case it is necessary to go…
-
1
votes1
answer383
viewsA: Delphi - Join two different database tables
It is possible through the FireDAC, data access library. See the reply I provided, very interesting and easy.
-
2
votes1
answer780
viewsQ: Export report to PDF
Use the pReport of the extinct VTK Tools as a report generator in the Delphi XE7. It does not have native export to PDF. Today, I export to PDF calling a virtual printer with parameters. But I don’t…
-
0
votes3
answers1918
viewsA: How to change the line color of a Dbgrid in Delphi?
At the event onDrawColumnCell of DBGrid you must include the code: if DBRadioGroup1.ItemIndex = 0 then begin DBGrid1.Canvas.Brush.Color := clBlue; DBGrid1.DefaultDrawDataCell(Rect, Column.Field,…
-
3
votes1
answer688
viewsQ: Color generator
I want to develop a generator of random colors but that are clear, that is, it is possible to read a text with black color on the color generated randomly. Random colors I can generate using the…
-
0
votes1
answer400
viewsA: Java Speech API, in Portuguese
From what I’ve seen, you can reach that result with a certain degree of effort. That one Link indicates the paths to follow: IBM Via Voice; Another synthesizer - mbrola…
-
2
votes1
answer400
viewsQ: Java Speech API, in Portuguese
It is possible to generate a voice synthesizer using the API Java Speech, but with accent Aportuguese? I don’t know much about Java, if it is possible to detail the answer, I thank you.…
-
6
votes1
answer172
viewsQ: Indentation in a Tedit
It is possible to indent a text inside a TEdit or a derivative component (ex. TLabeledEdit)? If yes, how? I don’t want to line him up (Left, Center, Right), I just want to indentify it, like it’s…
-
1
votes1
answer81
viewsQ: Display current page number in dbChart
I have a dbChart displaying data on multiple pages. In a specific graph, for example, there are thirty points to display, but in the property MaxPointsPerPage set only 10 (ten) points per page. I…
-
2
votes1
answer531
viewsA: Serial port reading in xe8
Tcomport exists for XE versions as well. link
-
1
votes1
answer175
viewsA: Replace Edit Text property. How?
I managed to solve. I created a Text property with Read/Write Gettext and Settext. In the Gettext make the Result receive the value I want, for example the Hint, and if you want the default value, I…
-
0
votes1
answer175
viewsQ: Replace Edit Text property. How?
I’m developing a component that’s descended from a TEdit. When calling the application the property Text of this component, I do not want to return what is effectively appearing in the Text…
-
4
votes1
answer2204
viewsA: Firedac -How to use the same Fdquery in more than one bank?
Hello, yes possible. The component to be used is FDLocalSQL, where you would basically do the SELECT of a FDQuery. In practice, it works like this: Insert a component FDLocalSQL; Enter the dataset s…
-
1
votes2
answers650
viewsA: How to return Datasnap Server image and show in browser
Usually in the transmission of images via REST, is used to base64 to encrypt the image. Transmission in base64 is much lighter as it does not store information on cache.…
-
2
votes1
answer241
viewsQ: Develop PDF417 with Delphi
Good afternoon. I use an old report generator for Delphi XE7 (pReport). I have the source code of it, and I’ve already made many changes to it. Now one more challenge, I need to include a new type…
-
2
votes2
answers1390
viewsQ: Is Locating a Clientdataset very expensive?
Make a locate of a dataset connected to the bank, certainly is quite costly. But make a locate in a dataset with in-memory data only, is a good practice? Or would it be better to create a array?…
-
1
votes2
answers263
viewsA: Disable editing of Firedac dataset without generating an exception
Replaces the event DoBeforeDelete of FDQuery. At this event, I check the property EnableDelete is unchecked and if so, I only execute the command Abort. It may sound a little extreme, but it does…
-
0
votes1
answer1416
viewsQ: Generate an XLS without using Excel (BIFF)
How to generate a file .xls without using Excel? I don’t wish to use the OLE, before entering the information in binary format, using the structure BIFF8 or something similar. The problem is I can’t…
-
2
votes2
answers263
viewsQ: Disable editing of Firedac dataset without generating an exception
Suppose a FDQuery with a select simple be connected with a DBGrid. I want to prevent the user from making any edits to the registry. I know there’s a choice EnableDelete in the FDQuery, but if the…
-
0
votes0
answers323
viewsQ: Chat with two types of client
I wish to chat in Delphi. In a standard project where the two tips would be using a quiet Delphi application (Socketserver and Clientsocket). But my question is the following: One of the tips will…
-
2
votes0
answers718
viewsQ: How to manage multiple transactions with Firedac?
Greetings. I have a Tfdconnection and would like to have two Tfdtransactions in my project. Tfdconnection is not connected to any Transaction, only Transactions are connected in Connection. Only…
-
2
votes1
answer256
viewsQ: Shellexecute without Security Warning
How to run an application with ShellExecute and prevent Windows from issuing the "Security Warning"? Is there any parameter that can be sent to avoid the warning? I have tried to apply some in…
-
1
votes1
answer733
viewsQ: Slow to compile project in Delphi XE7
Good afternoon. My system has about 30 blp s that are inside a Projectgroup. When I was at Delphi 7, compiling all the bpl s took about 2 minutes. Now at Delphi XE7 it takes about 20 minutes. I…
-
0
votes0
answers637
viewsQ: Problem closing thread application inside a component
I am developing a component (visual indicator) that to search the data in the database and generate the indicator itself uses a Thread. This Thread is inside the component itself. It works fine,…
-
2
votes2
answers390
viewsA: Delphi Triangle - Canvas
I found out! Follow the mathematical logic: x01 := Round(x0 * (1 - Cos(Angle))); y01 := Round((R.Bottom - 1) * (1 - Sin(Angle))); x02 := Round( x0 + radiusS * Cos(2 * pi / 3 + Angle) ); y02 :=…
-
3
votes2
answers390
viewsQ: Delphi Triangle - Canvas
I want to draw a triangle in Delphi through the Canvas. This pointer will serve as a pointer to a Gauge (Speedometer) as in this example: I use the TPoint() to define where the pointer will point. I…