The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,767 other followers

Archive for October 16th, 2019

delphi – How to set form height larger than 1096 pixels? (or width > 1620 pixels)- Stack Overflow

Posted by jpluimers on 2019/10/16

Delphi will limit [WayBackHeight or [WayBack] Width of a form in the designer based on the current Windows limitations, not on what your target users might.

See [WayBack] delphi – How to set form height larger than 1096 pixels? – Stack Overflow:

The reason for this behavior is that when you do not set constraints for the form size, Delphi will automatically get constraints at system level via the [WayBackWM_GETMINMAXINFO message, which is fired when…

Solution is to configure the [WayBack] Constraints property by setting either [WayBackConstraints.MaxHeight or [WayBackConstraints.MaxWidth.

Via: [WayBack] Since I put up 10.2, I cannot get a form width >1620. Whenever I enter a greater value, the system changes it back! As I have some programmes with comp… – erik wilson – Google+

–jeroen

Posted in Delphi, Development, Software Development | Leave a Comment »

Some Delphi settings require you to run with an Administrative UAC token

Posted by jpluimers on 2019/10/16

Though user-defined Code Templates live under %UserProfile%\Documents\Embarcadero\Studio\code_templates\Delphi, the stock ones (standard ones shipping with Delphi) ones do not: they live under %ProgramFiles(x86)%\x\Studio\y.0\ObjRepos\en\Code_Templates.

Above, x usually is Embarcadero, and y is your Galileo version number; see for instance Update to List-Delphi-Installed-Packages.ps1 shows HKCU/HKLM keys and doesn’t truncated fields any more.

Unlike user registry settings, which are copied from HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER, the stock Code Templates are not.

This means that if you want to change the stock Live Templates (for instance disable them) from the IDE, or from the Windows Explorer, you need to run them with an UAC token to elevate them to Administrator level permissions.

Oh, did you notice the consistency between code_templates and Code_Templates? Delphi is full of these consistency surprises**

via: [WayBack] EDIT…..ANSWER: Right-click and run Delphi IDE as “Run as Admin”.. remove the template. Start IDE normally. .. IMHO, you shouldn’t have to do this… – Vin Colgin – Google+ who commented:

Vin Colgin:
+Uwe Raabe yes. Imho. Delphi should use a UAC helper app to change things that need elevated permissions… just like we all have been doing with shipping software since Windows Vista. But nobody asked me. Imho.

as a response to

Uwe Raabe:
Usually you don’t have access rights to Program Files where the standard code templates live. Therefore you cannot remove any of these from inside the IDE. Either adjust the behavior to your needs (that will make a copy) or remove it from $(BDS) with admin rights.

** Some more consistency examples:

Just pick a few functions from these or more recent Delphi versions:

For example (there are many more):

Read the rest of this entry »

Posted in Delphi, Development, Software Development | Leave a Comment »

SSCCE, MWE and MCVE are basically the same: provide code people can use to reproduce a problem

Posted by jpluimers on 2019/10/16

Many times I see people asking questions about problems in their source code, it goes like this:

  1. Question is asked formulating the problem, but without any source code
  2. A comment asks for source code
  3. Either the response is “the source code is too big”, or the response contains a really big blob of (compressed) code that

If you have such questions (I still often have them), then you need to do just two things (which you often can combine in one step):

  1. Condense down the code into a small bit that others can use to reproduce the problem.
  2. Talk to an (imaginary) person explaining the problem you have and the condensed code.

The second is called Rubber Ducking after a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck.

The first is known under at least three terms:

They all come down to the following:

Provide a small piece of working code that is readable anyone can use to reproduce a problem without much effort.

via: Can we create a Help Center topic that outlines what a SSCCE / MWE means for Stack Overflow?

–jeroen

Posted in Conference Topics, Conferences, Development, Event, Software Development | Leave a Comment »

 
%d bloggers like this: