

Lajos Juhász
Members-
Content Count
1063 -
Joined
-
Last visited
-
Days Won
15
Everything posted by Lajos Juhász
-
Add onClick event on TCanvas
Lajos Juhász replied to direktor05's topic in Algorithms, Data Structures and Class Design
It is TNotifyEvent = procedure(Sender: TObject) of object; To assign a value OnClick event you have to create a method with this signature. For example: type TForm1 = class(TForm) Image1: TImage; procedure FormCreate(Sender: TObject); procedure DoSomethingClick(Sender: TObject); // Event handler for an OnClick private { Private declarations } public { Public declarations } end; Then you can write in your code: procedure TForm1.FormCreate(Sender: TObject); begin Image1.OnClick:=DoSomethingClick; end; -
Devin AI - Is it already happening?
Lajos Juhász replied to FreeDelphiPascal's topic in General Help
Microsoft might or might not using Github for train AI. How can you be sure that when you send with a prompt a piece of code it is not going to be used for training the AI system. If that code contain some top secret detail. The owner of the source code could sue the developer. (I daily work on code bases that is owned by a client of the company I am working for) -
Devin AI - Is it already happening?
Lajos Juhász replied to FreeDelphiPascal's topic in General Help
Not in near future. Embarcadero made the decision to not integrate any AI yet due to possibility of security issues. Not every customer would be happy if an AI could see their source code. The code could hold sensitive data or proprietary code owned by the company or its client. The current AI systems anyway can help you only to write or check trivial code. You can achieve that using ide plugin or copy paste to AI. -
Create a new VCL application. Double click on the form to create the formcreate method and add the line to change the icon for mtInformation: procedure TForm1.FormCreate(Sender: TObject); begin MsgDlgIcons[TMsgDlgType.mtInformation]:=TMsgDlgIcon.mdiInformation; end; After the {$R *.dfm} line add: uses System.UITypes; Add a button to the form and create an onlick event: procedure TForm1.Button1Click(Sender: TObject); begin MessageDlg('test', TMsgDlgType.mtInformation, mbYesNo, 0) end;
-
MsgDlgIcons is a global variable (array) defined in VCL.Dialogs. As with any global variables there is no guarantee that somebody somewhere in the code will not change the value (searching in VCL it is a "constant variable"). If you are sure that no library you are using is not changing the value of the array you can safely change somewhere where you initialize your application.
-
“Transitive” type redefinitions in interface section
Lajos Juhász replied to Dmitry Onoshko's topic in Algorithms, Data Structures and Class Design
There is no "general rule" against. However I have had a case where the developer have had a similair idea where an access unit was introduced that used the "smaller" units where various forms, features were implemented. Fast forward 20 years and this design resulted a hell of circular references. The best way to solve it is to not use the access unit but directly add everywhere the required units and use the classess and functions directly as needed having zero circular reference. This made the compiling more stable (less errors in the IDE), parallel to this I have had to kill unit scope names. -
I would bet it is the display format on the field of the query.
-
Sooner or later you will have to rewrite the UI to be more high-DPI friendly. Changing an image should not require a lot of testing. I did that for several "1M" line of code applications without a problem. Yes it requires time, but it is a must for an old application to be able to work on "modern monitors". (A TBitbtn style program I bet looks very outdated)
-
In your example you are missing the ObjectName property it must contain the name of the table that you are querying the fields information.
-
That could explain that they are not present on FB (last post from 2022), YT last video is 3 years old.
-
It is not a rocket science to combine two files: copy /b pythone_Fixed.7z.001+pythone_Fixed.7z.002 pythone_Fixed.7z Devd gave the reason why it is not a single zip "attach 7z have 2 splits, i can't upload split2. forum limit file only 4m+ sorry"
-
7zFM from the screenshot is part of the 7zip.
-
It is strange I can open it. Combine the two split files into a .7z and you open it using Windows Explorer.
-
Here you can find out more https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_VCL_TControlList_Control.
-
You could try something like this. Add a new private field to the form fPrevWidth: integer; procedure TForm1.FormResize(Sender: TObject); begin if (Abs(fPrevWidth-width)>50) or (GetAsyncKeyState(VK_LBUTTON) and $8000 = 0) then begin getCaption; fPrevWidth:=Width; end; end;
-
(In theory) Embarcadero tries to improove the quality of the integration. In case of the parallel debugger not the plugin is the reason but the IDE. According to David Millington it stresses the IDE and brings out error that would not surface during normal usage.
-
Using reFind to remove property of a specific component
Lajos Juhász replied to JonRobertson's topic in Tips / Blogs / Tutorials / Videos
I hope one day they will change their mind on this matter. IMHO even when migrating db related components this would be useful. -
The delay is due to the fact that whenever the users moves the mouse during the resizing the getCaption is executed. It costs time to calculate the required space for every item.
-
Existing connection forcibly closed by remote host
Lajos Juhász replied to bazzer747's topic in Databases
Unfortunately docwiki is down. I cannot comment on how you can configure SQL Server as I am not using that database. About the driver that is loaded you could try to query the FDConnection using the method GetInfoReport: https://docwiki.embarcadero.com/Libraries/Sydney/en/FireDAC.Comp.Client.TFDCustomConnection.GetInfoReport Google returned this https://stackoverflow.com/questions/64048094/connect-firedac-to-sql-server-through-odbc-driver-17-instead-of-sql-server-nativ: 1 For design time: drop a TFDPhysMSSQLDriverLink on the data module or form and set the ODBC driver to: ODBC Driver 17 for SQL Server in the drop down. After that open your TFDConnection and switch to the Info tab and check what driver it ends up using along with any notes it mentions. Note from the OP: To work for me I've needed to give a name to the TFDPhysMSSQLDriverLink component on its DriverID property, and set that name to the DriverName property of the TFDConnection. -
Unicode NBSP(u00A0) No-Break Space character for 64-bit
Lajos Juhász replied to sp0987's topic in RTL and Delphi Object Pascal
A sample application that we can compile as a 64 and 32 bit would help us to help you. We can only suggest that you make improvements in your code. -
Suggestion for next version name - YASAB
Lajos Juhász replied to marc7909's topic in Delphi IDE and APIs
You should include the version you are using also what is installed in the IDE. For me the IDE is fast and working ok during the day. Using Delphi 12.1 only with MMX. During the day it maybe stucks only 1-3 times. -
Make a TMemo.seltext modification cancellable by the user
Lajos Juhász replied to FabDev's topic in VCL
It was introduced recently. Delphi XE5 does not have it yet. -
Make a TMemo.seltext modification cancellable by the user
Lajos Juhász replied to FabDev's topic in VCL
It is an easy to debug. You have to set the CanUndoSelText property to true. https://docwiki.embarcadero.com/Libraries/Alexandria/en/Vcl.StdCtrls.TCustomEdit.CanUndoSelText -
Variable might not have been initialized
Lajos Juhász replied to shineworld's topic in Delphi IDE and APIs
We already know that it is not defined in case when FWorkOrderManager.GetWorkOrderDataByIndex(WorkOrdersSelectedRow - 1, Data) returns false. -
I cannot access it,