Posts by Benjamim Mendes Junior • 1,017 points
39 posts
-
-1
votes0
answers11
viewsQ: How to print a text with FMX.Printer
Hello, I’m migrating a print code via Vcl spooler to FMX (Firemonkey), but I can’t find the FMX method equivalent to the Vcl method Printer.Canvas.TextOut. Please tell me what methods are used to…
-
0
votes0
answers25
viewsQ: Media in a Pivotgrid
Hello to everyone as the image below would like to calculate in a Tcxpivotgrid, in the summary (last record), the average unit value (total value divided by the total Qtde) and not the average unit…
-
0
votes2
answers347
viewsA: Lazarus Debugando
No Lazarus go on View->Debug Windows->Local Variables and View->Debug Windows->Watches Together they are more powerful than the Delphi tool, but they are not so simple…
-
3
votes1
answer1245
viewsA: Delphi RTTI get the property value of an object that is owned by another
After researching a lot (3 days!) I ended up discovering the solution together with a co-worker. Below is an example of the solution implemented within a onClick and a button procedure…
-
1
votes1
answer1245
viewsQ: Delphi RTTI get the property value of an object that is owned by another
I am having doubts about how to obtain, via RTTI, the value of a property of an object that is owned by another. Below are two objects and their relationships. In this example I would like to get…
-
0
votes1
answer530
viewsA: Color of Dbgrid font in Delphi Berlin
Even posting the doubt in Delphi Experts,I did not get a satisfactory answer, but I will go here the two solutions found: 1: Avoid formatting code whenever the record is selected. This way the…
-
0
votes1
answer530
viewsQ: Color of Dbgrid font in Delphi Berlin
I’m having trouble changing the text color of the records displayed in Dbggrid in Delphi Berlin (10.1 update 1). When trying to change the font color and turn on italics and bold, all records appear…
-
0
votes2
answers304
viewsA: How to automatically select the first item of a popup menu
After a few more researches and tests I arrived at the following solution. In the event OnPopup enter the code keybd_event(VK_DOWN, 0, KEYEVENTF_EXTENDEDKEY, 0); keybd_event(VK_DOWN, 0,…
delphianswered Benjamim Mendes Junior 1,017 -
0
votes2
answers304
viewsQ: How to automatically select the first item of a popup menu
I have a screen where a popup key is opened through enter as a hotkey. My problem is that I can’t get the first option to be preselected to be activated with a Enter. Summarizing: I would like when…
delphiasked Benjamim Mendes Junior 1,017 -
1
votes1
answer280
viewsA: Dbgrid fields have Duplicate Text
The tip site of Brutus has the solution of this problem as the explanation is a little large, follows below the link to the site.…
-
4
votes0
answers330
viewsQ: Inform Tfdautoincfield field value using Fdquery
Hello, Utiliso Mysql and I am migrating my projects from Delphi 2007 + Zeos to Delphi Berlin + Firedac (big change eim) and due to some business rules, auto increment fields of Mysql can be informed…
firedacasked Benjamim Mendes Junior 1,017 -
2
votes0
answers216
viewsQ: How to create a Windows service on installation
I will distribute my Delphi application through a standard installer created with Install Shield, but it needs to create a Windows service to work. I know how to create this service manually, but…
-
1
votes1
answer515
viewsQ: App expect Alertdialog response to password
The function below returns a password typed in AlertDialog and is in a class responsible for creating any dialog box in my app, but as a whole AlertDialog the app does not "wait" the return of the…
-
0
votes1
answer4041
viewsQ: Block and unlock editing an Edittext
In the code snippet below I disable the freight value edition when the freight type is SIF put the code snippet Library.editTexPermission(edtFrete, true); that should release editText edition does…
-
1
votes3
answers506
viewsA: How to get the object focused on Android
Below is the declaration of the function onFocusChangeListener made with Marco Giovanni’s tip: View.OnFocusChangeListener onFocusChangeListener = new View.OnFocusChangeListener() { @Override public…
-
1
votes3
answers506
viewsQ: How to get the object focused on Android
Hello to all I have the following Listener below which checks if an editText has been changed, the Listener will be identical to several editText so I would like to get the current editText through…
-
0
votes1
answer114
viewsA: Stay proceedings
Would closing the case solve your problem? Work it out try: PostMessage(FindWindow(<nome_da_tela_principal_do_processo>, nil), WM_CLOSE, 0,0);
-
6
votes1
answer277
viewsQ: Update Textview on onResume
package br.com.automaserv.stocserv.fragments; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import…
-
1
votes1
answer320
viewsA: How to generate the EAD code for PAF-ECF in C#, according to ATO COTEPE 23/15?
The simplest way to sign the PAF-ECF files is with the components of the Acbr Project. It has components dedicated to PAF that speed and greatly develop any system. To not use a Ctrl+C, Ctrl+V and…
c#answered Benjamim Mendes Junior 1,017 -
2
votes1
answer232
viewsA: Change "Step" in Quickreport "Printing Progress"
I did not find a "conventional" way, but it is possible to change the progress directly in the Quickreport file itself. Unit is called "qrprgres.pas" and is in the Quickreport installation root…
-
2
votes1
answer232
viewsQ: Change "Step" in Quickreport "Printing Progress"
I’m developing a system for printing tickets, so I send extensive files to print, around 25,000 pages per view. Due to that large number of pages the "Printing Progress" of the Quickreport It takes…
-
1
votes2
answers1191
viewsA: Csharp Fill Combobox with query, but bring already selected the option saved in the bank
You can simply inform on the property SelectedItem the object you want. In the answer you gave, you pass the property pro_local to the property SelectedValue. If the object "product" is contained in…
-
5
votes1
answer144
viewsQ: Cancel Doubleclick on Treeview
I am using a TreeView to control permissions on my system, each operator has a profile that determines their minimum access, but it is possible to give more permissions to a particular operator,…
-
3
votes3
answers1370
viewsA: One button code to undo an action in C#
Really the best way to do what you want is by using a stack. If you don’t know what a stack of data is, I suggest you start by researching what a "stack" is. Follow a video link with a simple…
c#answered Benjamim Mendes Junior 1,017 -
1
votes1
answer51
viewsA: Path points in xaml
This is a case of Path Find trying to use the A* algorithm (it is one of the simplest, however there are others more efficient) where each pixel will be a house and the pixels filled with the black…
-
5
votes2
answers3983
viewsQ: How to disable form field using Jquery
I have a registration form where the client type the zip code by Request using Ajax to get the address, the neighborhood, the city and the state. But how do I disable these fields after they have…
-
3
votes2
answers553
viewsA: Function with CAST and SUBSTRING
In order for the same function to return the last 2 digits or to return the number without the last 2 digits it is necessary that you do not use the LENGTH within the function but rather in its…
-
5
votes2
answers957
viewsA: C# - How to make a lambda filter with more than one field?
Create the function below and pass as parameters of the function the values you want to filter public List<Carro> Filtrar(List<Carro> lista, int Ano, double valor) { List<Carro>…
-
2
votes2
answers232
viewsQ: C# error when trying to add an inherited component in Toolbox
I am trying to create a component that inherits from a Combox. I created the component by following the steps below, the project is available at:…
-
3
votes2
answers918
viewsQ: How to cast a typed class in C#?
I own the class Carro who inherits from the class Objeto and another class CarroTeste implementing the abstract class TesteBase that by its implements the interface ITeste, both (TesteBase and…
-
3
votes4
answers815
viewsQ: Reflection of an Object that is owned by another
In my code I use a class called GenericField<T> which is used in all attributes of another class called Aplicacao. Until everything well, however, in another part of the code I need to get via…
-
0
votes2
answers335
viewsA: How to decide which cryptographic hash to use?
The most common of all is MD5, most databases already have native functions to generate this type of hash. This is also your main problem because there are already MD5 libraries on the internet, so…
cryptographyanswered Benjamim Mendes Junior 1,017 -
6
votes2
answers1014
viewsA: Setting up a database, how do I make this relationship?
If you need to issue comparative reports between companies or unified reports (Ex: Gross Profit sum) you will need to put at least in the tables related to moving products, services and financial.…
-
3
votes1
answer1365
viewsA: Countdown in two tables
Try JOIN with COUNT defining the field that will be counted because it ignores the null records. SELECT bairro, COUNT(idCarro) AS qtde_carros, COUNT(idMoto) AS qtde_motos FROM bairro b LEFT JOIN…
-
2
votes2
answers215
viewsA: Recover column of a Join in view
I don’t know Codeigniter, but if you can change or write SQL directly try something similar to this: SELECT c.ds_observacao AS ds_observacao_cliente, os.ds_observacao AS ds_observacao_ordem_servico…
codeigniteranswered Benjamim Mendes Junior 1,017 -
8
votes2
answers362
viewsQ: How do I convert LINQ to SQL for Mysql?
I am trying to remove the use of SQL statements from within the system (to make it flexible as to which database will be used), use instructions Insert, Update and Delete via stored Procedure…
-
5
votes1
answer1837
viewsQ: What are the differences between a Datatable and a Datareader for Mysql queries in C#?
I am creating a C# project with Mysql, my connector follows the standard Singleton and use Mysqldatareader to recover the table data and popular a List so far ok. My problem started when I had to…
-
1
votes3
answers1895
viewsA: Dynamic Query in a List
The intention of performing a dynamic query in List was to assemble a form that would display the List in a Datagridview and perform a query in all attributes of the List objects, and the List…
-
4
votes3
answers1895
viewsQ: Dynamic Query in a List
How to apply a filter to an object List generic using Lambda? I know with Reflection i can get an array with the properties names of my object and through itself Reflection recover the property of…