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,417 other followers

Archive for the ‘Delphi 2007’ Category

Delphi 2007 – when you lost your Borland.*.Targets file during a Windows upgrade

Posted by jpluimers on 2018/08/09

When upgrading Windows, it will create a fully new %windir% for you.

Any files an application installed files in them will be gone, and appear in a %HomeDrive%\Windows.old

If you’ve deleted that directory because you thought all your applications worked, or the Windows 10 upgrade automagically deleted the Windows.old directory by itself after some grace period, then you might be in trouble.

One of those applications is Delphi 2007. I wrote about a different issue on x64 Windows on that product before: Delphi on Windows x64: solution when project compiles fine under IDE, but not using MSBuild.

Basically it puts these files in %windir%\Microsoft.NET\Framework\v2.0.50727:

  • Borland.Common.Targets
  • Borland.Cpp.Targets
  • Borland.Delphi.Targets
  • Borland.Group.Targets

Those will be gone if you deleted the Windows.old directory.

If you are lucky, the files are also in this directory to copy back to %windir%\Microsoft.NET\Framework\v2.0.50727 and %windir%\Microsoft.NET\Framework64\v2.0.50727:

C:\ProgramData\{B59CE2E6-B15A-4F23-BD0E-72BF2ADDC3C7}\core\7EFD2DA3\6C948720

And if you’re not, you can find them here too: https://gist.github.com/anonymous/ab801cd925e5e634518fd5592eb2a46e

–jeroen

via:

Read the rest of this entry »

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

“Don’t access VCL from a background thread” – how to demo that?

Posted by jpluimers on 2018/07/11

When accessing the VCL from multiple threads at the same time: adopted from ...\DEMOS\THREADS\THRDDEMO.DPR

When accessing the VCL from multiple threads at the same time: adopted from …\DEMOS\THREADS\THRDDEMO.DPR

Great question a while ago:

[WayBack] “Don’t access VCL from a background thread” – how to demo that? – Primož Gabrijelčič – Google+

For me, the ultimate way why not to access the VCL from a background thread is the precursor of the official threads demo that ships from Delphi 2 to Delphi XE6 in ...DEMOS\THREADS\THRDDEMO.DPR. where you’d think the thread isolation would be in ...DEMOS\THREADS\ThSort.pas but actually is in ...DEMOS\THREADS\SortThds.pas.

The first public showing of that demo did not include main thread protection. It originates from a session at the the 1995 Borland Developers Conference where Ray Konopka showed the below code from Bob Ainsbury.

That session reminded why this joke [WayBack] Via the EKON20 sessions… – Jeroen Wiert Pluimers – Google+ was so funny:  “When Ray Konopka enters the room you have a Raize condition.“.

The question above also made me find back this reference to BorCon95 in San Diego:

Read the rest of this entry »

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 10.2 Tokyo (Godzilla), Delphi 2, Delphi 2005, Delphi 2006, Delphi 2007, Delphi 2009, Delphi 2010, Delphi 3, Delphi 4, Delphi 5, Delphi 6, Delphi 7, Delphi 8, Delphi x64, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 2 Comments »

VM disk sizes

Posted by jpluimers on 2018/06/29

I forgot to schedule the post below. It is still relevant if you create a machine with lots of Delphi versions on it.

Read the rest of this entry »

Posted in .NET, .NET 2.0, .NET 3.0, .NET 3.5, Database Development, Delphi, Delphi 2007, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Development, Firebird, InterBase, Power User, Software Development, Windows, Windows 8 | 2 Comments »

How to embed a superscript Registered symbol in a Rave memo buffer.

Posted by jpluimers on 2018/04/24

Thomas Pfister came with a nice solution to this question:

[WayBack] Does anyone know how to embed a superscript Registered symbol in a Rave memo buffer? – Phillip Woon – Google+

Since Google has such bad indexing of G+, here is the solution:

procedure TForm4.RvSystem1Print(Sender: TObject);
const
  SuperscriptOn = RPTFPrefix + RPTFSuperscript + RPTFOn + RPTFSuffix; // from RpDefine.pas
  SuperscriptOff = RPTFPrefix + RPTFSuperscript + RPTFOff + RPTFSuffix;
var
  MemoBuf: TMemoBuf;
begin
  MemoBuf := TMemoBuf.Create;
  try
    MemoBuf.Text := 'Test' + SuperscriptOn + '®' + SuperscriptOff + ' Test';
    MemoBuf.PrintStart := 0.5;
    MemoBuf.PrintEnd := 8.0;

    with Sender as TBaseReport do begin
      PrintMemo(MemoBuf, 1, true);
    end;
  finally
    FreeAndNil(MemoBuf);
  end;
end;

–jeroen

Source: Does anyone know how to embed a superscript Registered symbol in a Rave memo …

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | Leave a Comment »

… / source / Native / Delphi / Library / Data / DataSetEnumeratorUnit.pas — Bitbucket

Posted by jpluimers on 2018/04/18

Reminder to self that I one day need to write more about this enumerator:

[WayBackjeroenp / BeSharp.net / source / Native / Delphi / Library / Data / DataSetEnumeratorUnit.pas — Bitbucket

It’s not nearly as good as the one by Uwe Raabe, but I didn’t really update this code for about a decade as it has functioned well for me in the current state: in 2009 it was like [WayBackbo library – Source Code.

Code by Uwe is at [WayBackDataset Enumerator Reloaded | The Art of Delphi Programming via [WayBack] Refurbishing old code: http://www.uweraabe.de/Blog/2017/02/09/dataset-enumerator-reloaded/Uwe Raabe – Google+

A couple of years ago I wrote a two-part article about a dataset enumerator: A Magical Gathering – Part 1 and Part 2. Well, things evolved a bit since then and I wondered how one would implement something similar given the current features of Delphi. Actually I am following here a suggestion from commenter Alan Clark.

So for now it’s just to document that my enumerator is there and that it works as intended.

I referenced an older version at [WayBackFor-in Enumeration – ADUG as I used it at Spoken @ CodeRage III, December 1-5, 2008 on Delphi, database and XML related topics and Source: Conferences/2009/DelphiLive.2009/Smarter-code-with-databases-and-data-aware-controls.

A small video on how you use it is here:

It was back when Better Office and CodeGear still existed and we celebrated (late) Gwan Tan’s 50th birthday.

O the days (:

More history:

–jeroen

Posted in Delphi, Delphi 10 Seattle, Delphi 10.1 Berlin (BigBen), Delphi 2007, Delphi 2009, Delphi 2010, Delphi XE, Delphi XE2, Delphi XE3, Delphi XE4, Delphi XE5, Delphi XE6, Delphi XE7, Delphi XE8, Development, Software Development | 2 Comments »

 
%d bloggers like this: