-
Content Count
201 -
Joined
-
Last visited
-
Days Won
1
KodeZwerg last won the day on May 9 2021
KodeZwerg had the most liked content!
Community Reputation
37 ExcellentTechnical Information
-
Delphi-Version
Delphi 10.3 Rio
Recent Profile Visitors
-
TJsonTextWriter out of memory
KodeZwerg replied to jhoward1801's topic in RTL and Delphi Object Pascal
Since you did not told for what purpose you need to have everything stored to memory, another approach can be to use a database and only get/put data that you actual need for current task. -
Vote for Segoe UI as Default Font opened.
KodeZwerg replied to KodeZwerg's topic in Tips / Blogs / Tutorials / Videos
Hopefully that should give the doubters enough courage to vote 👍 -
Vote for Segoe UI as Default Font opened.
KodeZwerg replied to KodeZwerg's topic in Tips / Blogs / Tutorials / Videos
Thank you for voting, here is my workaround way to have it scaled properly: procedure ApplyFontAndScale(aForm: TForm); var OldSize : Integer; Font : TFont; begin OldSize := aForm.Font.Size; if Screen.MessageFont.Size <> OldSize then begin Font := TFont.Create; try Font.Assign(Screen.MessageFont); Font.Size := OldSize; aForm.Font := Font; finally Font.Free; end; aForm.ScaleBy(Abs(Screen.MessageFont.Size), Abs(OldSize)); end else aForm.Font := Screen.MessageFont; if aForm.BorderStyle <> bsSizeable then begin if aForm.Height > Screen.WorkAreaHeight then aForm.ScaleBy(Screen.WorkAreaHeight, aForm.Height); if aForm.Width > Screen.WorkAreaWidth then aForm.ScaleBy(Screen.WorkAreaWidth, aForm.Width); end; end; calling within OnCreate event. -
Vote for Segoe UI as Default Font opened.
KodeZwerg replied to KodeZwerg's topic in Tips / Blogs / Tutorials / Videos
You can read what Microsoft write in this link. Using "MS Shell Dlg 2" pseudo font is to be backward compatible i guess. (Would be fatal if from now on that HKEY would lead to Segoe UI, font size would not match on old applications....) Feel free to use the classic Windows XP way, my wish is to be more modern and not support Windows XP. -
Vote for Segoe UI as Default Font opened.
KodeZwerg posted a topic in Tips / Blogs / Tutorials / Videos
Good day everone! I did opened this https://quality.embarcadero.com/browse/RSP-33937 to have Segoe UI (Windows Vista+) as Default Font instead of Tahoma (Windows XP) Stay healthy! -
Prevent Alt or Ctrl + Print Screen
KodeZwerg replied to Henry Olive's topic in RTL and Delphi Object Pascal
Thank you Mr. Heffernan, that work! type TfrmMain = class(TForm) protected procedure CreateWnd; override; end; implementation procedure TfrmMain.CreateWnd; begin inherited CreateWnd; SetWindowDisplayAffinity(Handle, WDA_MONITOR); end; -
Prevent Alt or Ctrl + Print Screen
KodeZwerg replied to Henry Olive's topic in RTL and Delphi Object Pascal
SetWindowDisplayAffinity(Application.MainFormHandle, WDA_MONITOR); Does do nothing, did I called it wrong? //edit SetWindowDisplayAffinity(Application.MainFormHandle, WDA_MONITOR or WDA_EXCLUDEFROMCAPTURE); Also not working. (I called it in FormCreate event) Used Capture Software: Screenshot Captor from DonationCoder.com Tested on latest Windows 10 pro. -
My worry = corona virus 😞
-
Good day! I wonder why he does not log in anymore?! Since english DP started he aint active on german DP anymore and now inactive since start of 2021. Is he okay? @Sherlock
-
Prevent Alt or Ctrl + Print Screen
KodeZwerg replied to Henry Olive's topic in RTL and Delphi Object Pascal
Beside analog copy (smartphone) what cant be stopped (but can be a bit mangled if playing with display Hertz) and hooks to eat keyboard you can prevent digital copies (simple screencapture tools) by using overlay to draw screen or write direct to graphic card buffers. Simple Screencapture or Print would end with a black screen. -
Read-write protected, but read-only public property?
KodeZwerg replied to aehimself's topic in Algorithms, Data Structures and Class Design
Equal how you try, it end in a workaround since you publish it with a "write" property. -
Read-write protected, but read-only public property?
KodeZwerg replied to aehimself's topic in Algorithms, Data Structures and Class Design
that i mean, and within your class-code just adjust "_status" to whatever you like. or implement and publish a private setter to adjust only by code not by property if you know what i mean. TMyObject = Class(TObject) strict private _status: String; private procedure mysetter(const AValue: string); public Property Status: String Read _status; End; -
Read-write protected, but read-only public property?
KodeZwerg replied to aehimself's topic in Algorithms, Data Structures and Class Design
Why not dont publish "Read" "Write" at all and access internal the used Variable? -
Good quality Random number generator implementation
KodeZwerg replied to Tommi Prami's topic in Algorithms, Data Structures and Class Design
How about BCryptGenRandom from Windows Api? Is that random/quality enough for your needs @Tommi Prami ? -
@Geoff88: ShellExecute(Application.Handle, PChar('print'), PChar('A:\Path\to\a\file\to\print.pdf'), PChar(''), nil, SW_HIDE); you can let windows handle everything with that. this would open whatever programm is associated to print that file. //edit if you want full control, customized-printing-in-delphi, here you find everything you need.