How can I get a useful “W1036 Variable might not have been initialized” warning
var aClass: TTestClass; begin try aClass:= TTestClass.Create; // Do something finally if aClass <> nil then aClass.Free; end; end; This will raise the W1036, but there is a check to make this as memory-safe as possible. How can I make the compiler see the safety of this so it doesn’t fire hundreds of warnings across […]
How to get control of OnKeyPress event for the Edit field of a TLabeledEdit
My project is written with Delphi 12.1.
I have the procedure
How do I draw a PNG onto another PNG irrespective of the transparency?
Consider :
Delphi – Check windows printer preference (allow windows to manage the default printer)
I follow this post
How to make all possible combinations of several strings
I have a previously unknown number of words, stored for convenience within a TStringList object.
Why does delphi change the transparent color of a bitmap?
I have a bitmap (see attachment) that’s mostly white. So when transparency is turned on, it’s a white pixel in the corner and white is the transparent color.
Create form with parameter name and send parameter to this form
I read a file that has the name of the form I need to create.
After the form is created, before the ShowModal()
, I need to send parameters to this form.
Create form with parameter name and send parameter to this form
I read a file that has the name of the form I need to create.
After the form is created, before the ShowModal()
, I need to send parameters to this form.
How can I get a Pointer to a generic instance?
TTestClass = class content: Integer; end; TTest = class public class procedure TestProc<T: class>(obj: T); end; class procedure TTest.TestProc<T>(obj: T); var p: Pointer; begin p := Pointer(obj); p := @obj; end; Here, the two different ways of getting a pointer to an object give different results. RTTI functions take the first method, but it only […]
UNC Path incl. all server domain information
I need to compare path string and can’t work is any difference in the display information of an UNC path.
how to convert a path into the full UNC Version incl. server domain information in Delphin ?