-
Content Count
11 -
Joined
-
Last visited
Everything posted by mderie
-
Hi, I'm trying to perform something which should be basic : I want to print a given form content. But wait, with the border and title. So not only the ClientArea... So "self.print" is not enough ! I'm trying to play with the PrintWindow API but no luck till now. Any clue ? Thanks in advance Regards.
-
Well indeed, it does the trick (I've just have to implement the ratio / make it fit)... Using this : https://www.swissdelphicenter.ch/en/showcode.php?id=744 Many thanks NB : very fast and accurate answer by the way :)
-
Hi folks, I've discover this a bit by misluck : function GenerateAppGUID: TGuid; const guid : TGUID = '{481E85E5-3874-4FCB-BEA1-B65D640AE6D3}'; begin result := guid; // Compile fine ! end; function GenerateAppGUID: TGuid; begin Result := '{481E85E5-3874-4FCB-BEA1-B65D640AE6D3}'; // E2010 Incompatible types: 'TGUID' and 'string' end; I find this quite annoying... Regards
-
It is annoying since the compiler do the type conversion in the declaration and not in the assignement !
-
Delphi 10.4 Update 2 - Getting error E2411 Packaged units must refer only to packaged units
mderie replied to psla314's topic in RTL and Delphi Object Pascal
Scary... -
Global variable : why the compiler don't complain about this ?
mderie posted a topic in General Help
Hi, I was disturbed to say the least that one can declare a global variable the same name as an existing one in another (system) unit. IE : I encounter the case today, some funny guy declared a global like this one. FormatSettings : TFormatSettings; Althought the exact same line exists in SysUtils... I let you imagine what happened when debugging ! Since some units does include this funny one and the SysUtils one... Any idea ? And yes I know that globals are evil :) Regards. -
Global variable : why the compiler don't complain about this ?
mderie replied to mderie's topic in General Help
Well it could reduce the differences between Embarcadero / Delphi and Lazarus / FPC having a more clear distinction between what is system, OS related, GUI related ... -
Global variable : why the compiler don't complain about this ?
mderie replied to mderie's topic in General Help
Come on, compare it with what exists in C++ or C# (I don't know Java enough) Ask yourself what could be a namespace ! -
Global variable : why the compiler don't complain about this ?
mderie replied to mderie's topic in General Help
Embarcadero should introduce namespaces ! -
Global variable : why the compiler don't complain about this ?
mderie replied to mderie's topic in General Help
Hi, <NOSTALGIA_ON> I'm glad to rediscover a Delphi programmer community ! Back in time I was pleased to find answers through TeamB among other nice people And finding good components on Torry's Delphi pages </NOSTALGIA_ON> Now I've quickly test C++ in respect of type redeclarations and global variable redefinitions... Well let say that my heart beats for the later one... Delphi just takes too many shortcuts ! Regards -
Global variable : why the compiler don't complain about this ?
mderie replied to mderie's topic in General Help
Indeed, but it is a shame that the compiler don't emit a warning