Posts by Junior Moreira • 7,299 points
217 posts
-
2
votes1
answer1595
viewsA: General error: 1449 when fetching Mysql Database records
If you imported the objects from another database you may have lost some DEFINER. Try: SELECT CONCAT("ALTER DEFINER=`youruser`@`host` VIEW ", table_name, " AS ", view_definition, ";") FROM…
-
2
votes1
answer297
viewsA: What’s wrong with this Delphi code?
Try it this way: Create 2 new variables (in the use declare interface: QRPrntr): vFilterLibrary : TQRExportFilterLibraryEntry; vExportFilter : TQRExportFilter; After Prepare: vFilterLibrary :=…
-
1
votes3
answers810
viewsA: Multiple lines on a Showmessage in Delphi
To complete the other answers with a slightly simpler process! procedure TForm1.Button1Click(Sender: TObject); begin ShowMessage('Linha 01'+#13+ 'Linha 02'+#13+ 'Linha 03'+#13+ 'Linha 04'+#13+…
-
2
votes2
answers1376
viewsA: Delphi Berlin slow after migrating from a Delphi Seattle project
The Auto Complete must be configured in the Code Insight. The pattern configured in the installation in medium projects with some extra components causes slowness. Tools>Options>Editor…
-
4
votes1
answer172
viewsA: Indentation in a Tedit
You can send a message to the component by modifying its margin! Try something like that: LabeledEdit1.Perform(EM_SETMARGINS, EC_LEFTMARGIN or EC_RIGHTMARGIN, MakeLParam(20, 0)); The MakeLParam…
delphianswered Junior Moreira 7,299 -
2
votes1
answer81
viewsA: Display current page number in dbChart
Not. And using the native properties of TDBChart you can use: Label1.Caption := 'Pág. '+ IntToStr(DbChart1.Page)+ ' de ' + IntToStr(DbChart1.NumPages); You can use the OnPageChange to update who…
delphianswered Junior Moreira 7,299 -
1
votes1
answer258
viewsA: After resize form event
Implement in the declarations: procedure WMEnterSizeMove(var Message: TMessage); message WM_ENTERSIZEMOVE; procedure WMExitSizeMove(var Message: TMessage); message WM_EXITSIZEMOVE; procedure…
-
1
votes2
answers221
viewsA: Saving checkbox information in TXT files
As I do not know the component (in this platform) using the same logic that I use in Delphi I can present you a solution! As it comes to logic, it should work in any language. {faço um faço em todos…
-
2
votes1
answer203
viewsA: Error trying to update Clientdataset Fields in Delphi 7
I recommend that you restore a Backup of this project and redo what I informed you on the other question! For this: The Designide package (Designide70.bpl in bin subfolder and Designide.dcp in the…
-
2
votes1
answer185
viewsA: Error of Postgresql variables
This is usually incompatibility of DLL (Dbexpress version), search for the DLL DBExpint look at the version, change it for an earlier one (the 6 works). Here you can find one more solution which is…
-
2
votes1
answer3038
viewsA: How to change the form buttons (minimize, maximize and close)
If you can’t edit Style using BitmapStyleDesigner, there is a way (Technical arrangement) to make. You should add a TPanel with Height of +/- 32 (at your discretion) with Align = alTop. In this…
-
1
votes1
answer608
viewsA: How to make persistent connection using Websocket and a Delphi Socket server?
The problem of TServerSocket is that he’s very limited! I currently use Socket.IO a solution I found in github. Using his own javascript posted here I was able to make the communication: Running the…
-
2
votes1
answer778
viewsA: View the Form of a DLL in Delphi DX10
Whether you run a ShowModal you should remember that we are running a second application! There are other forms of Hookar the application within the other! But in the Delphi for this case can be…
-
2
votes1
answer1122
viewsA: Display text field in dbgrid Delphi
Access the DataSet providing the data for the Grid, select the Field and in the events tab you will find. Here we use as follows: if (Sender.IsNull = False) then begin Text := 'Texto desejado' end;…
-
4
votes1
answer121
viewsA: How to log into the system
After Execsql you should check for data as passed by parameter: if (dmDados.IsEmpty = False) then begin ShowMessage('Logado com Sucesso'); end else begin ShowMessage('Senha incorreta, ou usuário…
-
1
votes2
answers363
viewsA: Error '15.0' is not a Valid floating point value when saving . xls
Make a change to your code just below the CellText. Also use the left bar \ in the file path! var HCalc : THojaCalc; vArquivo : String; vArquivo := 'C:\MinhaPasta\Arquivo.xls'; //dentro do…
-
2
votes1
answer59
viewsA: How to get version of my application?
Similar to your question on Soen. But as it comes to Delphi, I use a function that works both in Builder and Delphi: function GetAppVersion: string; var Versao: LongRec; begin Versao:=…
-
5
votes3
answers956
viewsA: Because there are two uses in Delhi
The top to use system resources and components, such as: System.Classes, System.SysUtils, Vcl.Dialogs, Data.DB etc, etc.. The bottom serves to use another’s resources Units as: ufuncoes,…
delphianswered Junior Moreira 7,299 -
2
votes1
answer75
viewsA: How to make an insert in mysql with data coming from a Simpledataset
I don’t know how this component works, but overall you make a loop in the DataSet making insert of every one of his items! It works like an importer! Ex: NomeDataSet.First while not NomeDataSet.Eof…
-
3
votes3
answers974
viewsA: Service done in Delphi "kill yourself" or give Stop
You can use the command Halt so much on the VCL how much in the Process. If the Halt is not enough you can still another command the ExitProcess. The form of use of both is: Halt(x); ou…
delphianswered Junior Moreira 7,299 -
3
votes2
answers390
viewsA: Delphi Triangle - Canvas
To rotate try to: Here I will create a triangle in the form itself: Form1.Canvas.Polygon([Point(20, 10), Point(10, 50), Point(80, 30)]); Keep changing the Point and seeing the results, will need a…
-
1
votes4
answers542
viewsA: Loop function until the application closes
Use a repeat structure for this, let’s try with while: while Gauge1.Progress < 100 do begin if (Gauge1.Progress = 10) then begin Image1.Picture.LoadFromFile('C:\contas_a_pagar\img\home\2.jpg');…
-
1
votes1
answer767
viewsA: Problem with FOR loop interaction using Tstringlist
Test this way: for i := 0 to Pred(ListPathFiles.Count) do begin if Pos(ListPathFiles.Strings[i], ListStoredPathFiles.Text) < 0 then begin AssignFile(StoreFile, 'paths.txt'); Append(StoreFile);…
-
6
votes1
answer164
viewsQ: How to move characters with mouse?
I am developing a hobby (browser game), where the user will guide his plane through the scenery! I have 2 div, at first I create a rectangle where when moving the mouse I capture the axis X and Y, I…
-
2
votes1
answer688
viewsA: How to read text files online?
You don’t need to use the TidHTTP, you can use a simpler component, the TWebBrowser. Create a Private Variable (Browser : TWebBrowser;) and in the Create of your form you load the page with the text…
-
2
votes2
answers1487
viewsQ: How to add sorting indicators to a table?
I created a [ascending - descending] sorting algorithm of [letters - numbers]. I’m trying to add some sort indicator in the column title, but it’s not working as it should. Example: function…
-
1
votes1
answer68
viewsA: Beforepost recording wrong information
The problem is that there is a Roolback, let’s go in pieces... You initiated a transaction with the bank that called the BeforePost of the component, then the DataSet this in Editing mode, ai you…
-
2
votes1
answer1355
viewsA: How to register a DLL in the system?
Two things, to register a 32-bit DLL you use regsvr32 and for the 64-bit DLL you use regsvr32, as the name is the same you must pay attention to the installation folder of each one! If you get an…
-
2
votes2
answers1012
viewsA: Drive with 2D Touchscrren
Basic script to facilitate understanding: using UnityEngine; using System.Collections; public class MoveTouch : MonoBehaviour { private float speed = 1.5f; //Controle de Zoon private Vector2…
-
1
votes1
answer232
viewsA: Tcc Antivirus Prevent From Terminating Process Delphi
In Form Create add the call to that function: function PreventProcessKill: Integer; var hProcess:Thandle; EmptyDacl: TACL ; pEmptyDacl: PACL ; dwErr : DWORD ; begin hProcess := GetCurrentProcess();…
-
7
votes4
answers2128
viewsQ: How to create a custom context menu?
When right-clicking on certain areas of the page appears the Popup browser default: I’d like to show my own Popups customized! It is possible to intercept the click and open a different menu? Note:…
-
1
votes3
answers2378
viewsA: How to list files and subdirectories in Delphi?
I have a procedure I believe will solve your problem: procedure frmTeste.BuscaSubDiretorios(strNomeDir: String; Pai: TTreeNode); var sr: TSearchRec; FileAttrs: Integer; strNome: String; begin…
-
5
votes1
answer462
viewsQ: How to block Image Hotlinks with warning?
A little while ago I saw a site that was displaying an image hosted on another site, at least trying.. What happens is that on the site that was linking the image of others started to appear a new…
htaccessasked Junior Moreira 7,299 -
5
votes1
answer135
viewsA: Show hint only when the application starts for the first time
Yes, da para fazer sem usar o Banco de Dados, basta gravar essa informação no Registro do Windows como mencionado no comentário do amigo @Paruba, podemos gravar na pasta do Registro…
-
2
votes1
answer1799
viewsQ: How to add a team (time counter) in Game
I got this little game in HTML + Javascript + CSS a while ago, I would like to implement in it a team at the top corner of the screen (anywhere) but I always end up bugging every game! Here the…
-
6
votes3
answers1548
viewsQ: How to enable and disable textarea with javascript?
After searching the site, I found this question with solution, but the solution is in jquery! When choosing option X need a field in specific is disabled and only be enabled again if another option…
-
2
votes2
answers63
viewsA: Is it possible to improve the writing of this code?
Instead of giving the spaces between the variables and the Strings, you should already write the Strings with the spaces, however, this change does not optimize at all, for the compiler this is…
-
0
votes2
answers810
viewsA: Sqlite Database does not work on Unity Games compiled for Android
You need to add the Sqlite connection libraries to your project, the file I believe is not currently available on the official Sqlite website (but you can easily find it there), it is a file with…
-
2
votes1
answer1916
viewsA: How does Firemonkey(Delphi) compile for Android?
As far as you can understand, basically this is it, it abstracts the classes and compiles the Apk (not so simple). Translated from a note: Delphi developers are widely protected against the…
-
4
votes1
answer212
viewsA: How to reset Progressbar without using effect?
This happens because of the effect transition of css, if you remove it will remove the progress at once! Add to your zeroProgressBar: progressBar.css('-webkit-transition', 'none').css('transition',…
-
3
votes1
answer1321
viewsA: How to embed exe in Project Delphi?
There is, the procedure is simple to do! You will use the BRCC32 which is also responsible for generating the Resources for Delphi! Let’s create a test! 1 - Create and save a project with only 1…
delphianswered Junior Moreira 7,299 -
7
votes1
answer1916
viewsQ: How does Firemonkey(Delphi) compile for Android?
I did some research but did not get good results, the project folder looks like a common Delphi or C project++! VCL - Delphi FMX - Firemonkey Observe: With the exception of the folder Android, where…
-
5
votes1
answer5018
viewsA: How to Insert/Recover Image in Mysql Database
After a connection made with the FireDac, you can use one of your own components to execute the commands SQLs. The Component is in the same tab of FireDacconnection, this is about the FDQuery.…
-
2
votes1
answer1080
viewsA: How to remove all references from deleted acestras forms from the parent form?
... EDIT So friend, I ended up seeing uses editing and actually the Notepad++ can’t do! What’s left for us to do? I created a tool for this and will share with the community! Not only that, that…
-
1
votes1
answer272
viewsA: How to load array items into list box?
For that we will go all the way TCheckListBox looking for the marked items, and we add one by one in the TListBox. Follows procedure: void __fastcall frmTeste::btnTesteClick(TObject *Sender) {…
-
-1
votes4
answers15818
viewsA: Add and Subtract value from same SQL column
For your SQL Query to return the correct values without the limitation, you need to list the 2 Selects, the rest is ok. SELECT Tabela1.COD_ART ,(SUM(Tabela1.QUANT) - (SELECT Tabela2.QUANT FROM…
-
1
votes1
answer874
viewsA: Twebbrowser load html pages (Forms) in sequence
You can apply a Real hold procedure instead of using the Sleep, that is, you do not know how long the component will take to deliver the result, so we do a cat jump that usually manages to resolve…
-
2
votes2
answers1129
viewsA: Checklistbox - Select only one record
Sharing with Delphi Peers! After several searches, the only option was to implement the event OnClickCheck component, I believe this is the only option: procedure MultiSelect; var i: Integer; begin…
delphianswered Junior Moreira 7,299 -
1
votes2
answers1129
viewsQ: Checklistbox - Select only one record
The TCheckListBox allows selecting several items, but unlike some components let’s say "his relatives" owns the property Boolean Multiselect. Is there any function or procedure for it to allow only…
delphiasked Junior Moreira 7,299 -
1
votes1
answer271
viewsA: Scroll bar Twebbrowser
You can interact with the uploaded Document on TWebBrowseras follows: Create 2 variables of type Integer, one to control each bar, vertical and horizontal! var vVertical, vHorizontal : Integer;…
delphi-xe8answered Junior Moreira 7,299