-
Content Count
210 -
Joined
-
Last visited
-
Days Won
5
Posts posted by haentschman
-
-
Hi...
https://docwiki.embarcadero.com/Libraries/Seattle/en/System.IOUtils.TDirectory.GetCurrentDirectory
QuoteReturns the current working directory.
Use GetCurrentDirectory to get the current directory
Current working directory: 99% <> ExtractFilePath(Application.ExeName)
Quoteor the WIN API SetCurrentDirectory was called somewhere
Example: Current working directory can be "C:\Windows\System32" or else a special folder...
-
...learning by doing. 😎
You can also adapt the example to your circumstances. Release of the stream. etc.
-
...see editing
Quotebefore...Contact.Picture = nil 😉
...is my case. Sometimes i read the Picture to a new object (Picture = nil)
-
Hi...😎
try this...😉
if not Qry.FieldByName('Picture').IsNull then begin Stream := TMemoryStream(Qry.CreateBlobStream(Qry.FieldByName('Picture'), bmRead)); try Contact.Picture := TMemoryStream.Create; Contact.Picture.LoadFromStream(Stream); finally Stream.Free; end; end;
before...Contact.Picture = nil 😉
- 1
-
Hi...
QuoteMyDialog := TTaskDialog.Create(Self); try MyDialog.Title := 'Warning!'; MyDialog.Text := 'Relevant/selected Records prior to ' + sArchivedDate + ' have been Archived!' + #13 + 'This may make the figures inaccurate!'; MyDialog.CommonButtons := [tcbOk]; MyDialog.Execute; finally MyDialog.Free; end;
...this is right. 😉
QuoteTo me it is just another tool in the tool box of the language.
...but the language has also changed. "with" is 90's. The "new" TRect was imho the first problem in this case. The structure of TRect was changed. Some "with" had the false scope...AccessViolation.
The biggest problem with "with" is:
QuoteOne annoyance with using with is that the debugger can't handle it. So it makes debugging more difficult.
with TTaskDialog.Create(Self) do try Title := 'Warning!'; Text := GetTextFromFunction; CommonButtons := [tcbOk]; Execute; finally Free; end;
...and now you set a breakpoint on "Excecute". Then read the variable content from "Text" under the mouse...you see nothing.
QuoteBy the way, it will allow easier debugging: you can put a breakpoint, then point your mouse on
Obj
orNested
directly to get the internal values.More Info ( June 26, 2007 )
https://blog.marcocantu.com/blog/with_harmful.html
-
Quoteto using 'With', I do believe it has its place.
In the modern Delphi...always NO.
see uses TRect - https://stackoverflow.com/questions/71419/why-should-i-not-use-with-in-delphi ...and other.
procedure MainForm.ButtonClick(Sender: Object) begin with TMyForm.Create(nil) do try ShowModal; finally Free; end;
...this means a rebuild of the code if complexity increases...why not "right" with instance variable.
...and the variable display in the debugger does not work.
QuoteThe biggest being that with actually reduces readability. NOTE: Less code (using with) does not automatically improve readability. It reduces it because it's no longer explicit what the scope of identifiers within a with block refer to.
I am out of this discussion...
-
DBRadiobutton
in VCL
Clear... I have only TForm1 always renamed to foBlubb etc.
-
DBRadiobutton
in VCL
QuoteTForm747
...
-
Hi...
@gkobler: ...thanks
But...for the community: please without advertising (link) in the header ...then i install tis to.
-
Hi...😎
Quoteby the currently logged in users
1. multiuser?
2. server?...other maschine?
3. persistent data? ...or daily?
4. program crash? ...which data?
-
Hi...😎
Show the connection string...
-
-
Hi...
...always try/finally! In case of error IdHTTP.free is not executed because skipped to the end
Better:
IdHTTP := TIdHTTP.Create(nil); try try S := IdHTTP.Get(Link); result := S; except ShowMessage('Could not get VERSION information'); end; finally IdHTTP.Free; end;
-
Quotebut why not
i had problems with this...Windows Defender is imho good and enough...
...but now back to the topic.
-
QuoteBitdefender installed
...why? 🤢 (only my opinion)
-
Hi...
Quote* Made sure i have the same OpenSSL Dll's
...location of the dll?
-
Hi...😉
How about using a own TForm as a MessageDlg?
...own design, formatted texts (TStringlist etc.), own icons? 😎
-
Hi...
NOT with WITH:
with TFDQuery.Create(self) do
-
Hi...
QuoteEspecially if I need a change, I'll make it in one place.
...+1
-
...nothing. 😎
Why you want to change?
-
Hi...😋
Quotetable
...not query?
-
Hi...😎
QuoteI must have an id field....
...always! Per table or better per database. 😉 Per database = the ID is complete unique.
id varchar(10) not null primary key,
... never string!
ID int not null primary key,
-
Hi...welcome here.
First:
Quotedata to an Access database
...why ACCESS and ADO? 🤢 ...😉
For the future: can you change the database? 😉
const ISQL = 'INSERT INTO JobCard (ID ,OrderNo ,JobName) VALUES ( :ID :OrderNo, :JobName)';
...better than the ADD orgy. It is even better to store the SQL outside the "form" or "datamodule" as SQL file. 😉
QuoteI am a newbie
...i know. No problem. Learning by doing... 😉
-
QuoteOn 11/3/2021 at 9:00 AM, Daniel said: I gave the whole project to another MVP, I will ask about the progress.
Two month...What is the status? Which MVP?
Quoteat the moment it's the adaption to the high-dpi settings
Imho 10% uses high-dpi.
QuoteThe code itself works
...make a version without high-dpi. All waiting! Please...
PS: why don't you publish it on github or something...?
Zip Compression library
in Delphi Third-Party
Posted
Hi...
https://componentace.com/zipforge_features.htm
I use it to make zip of a MSSQL database backup. All others stop at 2GB.
6GB -> 1GB
For Single Developer with Source Code $149