Delphi Clinic C++Builder Gate Training & Consultancy Delphi Notes Weblog Dr.Bob's Webshop
Dr.Bob's Delphi Notes Dr.Bob's Delphi Clinics Dr.Bob's Delphi Courseware Manuals
 Dr.Bob Examines... #49
See Also: other Dr.Bob Examines columns or Delphi articles

Borland Delphi 8 for the Microsoft .NET Framework 1.1
In this article, I'll cover Borland Delphi 8 for the Microsoft .NET Framework, also known as "Delphi 8 for .NET", the development environment from Borland to build native .NET Framework 1.1 applications.
I'll tell you how to "tweak" the Welcome Page, where to find more information (like some articles I wrote earlier), and refer you to helpful resources like websites, papers, training, and more.
Latest News: Michael Swindell has posted a message on the borland.public.delphi.non-technical newsgroup about Delphi 8 Updates - the first one of which we can expect to be available in the coming days - not weeks!

Welcome Page
When you start Delphi 8 for .NET, the first thing you'll see is the Welcome Page. This page includes links to recently used projects or project groups, training, examples from code central (but not the examples on your own disk), on-line resources, and other Microsoft .NET solutions from Borland.

Note that you cannot remove the projects from the list of recent projects here, but you can manually edit - at your own risk - the list of recent projects in the registry at the key HKEY_CURRENT_USER\Software\Borland\BDS\2.0\Closed Projects. The five most recent projects are saved in that location.
The actual webpage, images and JavaScript (to retrieve the recent projects) can be found in the BDS\2.0\WelcomePage directory of your Delphi 8 for .NET installation. You can edit the default.htm file, change the d8welcome.gif image, or the JavaScript code.
Talking about changing this code... I personally find it a bit annoying that projects that are no longer on my machine (and hence result in a "File not found" message) are still shown in this list. If you know JavaScript then you can edit the file bdshome.js file - at your own risk - in the WelcomePage directory, and at line 264, change it from:

    for(var rc=1; rc<FRowCnt; rc++) {
    for(var rc=1; rc<FRowCnt; rc++) if (Cells[rc][1] != "File not found") { // BS
This is the easiest way (changing a single line of code). Note that "found" has a lower case "f".

I've also heard complaints about the fact that when you place the mouse cursor over the links for the project files, you get "default.htm" in the statusbar, and not the name or path to the project. This is also easy to fix, using the onMouseOver event handler in JavaScript. edit the bdshome.js file again (still at your own risk!), and change line 86 from the original:

    Text = "<a class=\"filename\" href=\"default.htm\" onclick=\"ClickMenu(" + Index + ")\">" + Text + "</A><br>";
To three lines that will use the filename as hint:
    Text = "<a class=\"filename\" href=\"default.htm\" " +
      "onmouseover=\"status='" + Text +  "'; return true;\" " +
      "onclick=\"ClickMenu(" + Index + ")\">" + Text + "</A><br>";
Note that you get the filename, and not the full path, however, since that would be far too long for most resolutions. Use a tweaked version of "Caption" instead of "Text" (in the second line) to get the full path. I leave that as exercise for the reader ;-)

Also feel free to edit the default.htm file, and change line 226 from a single <p> to the following (make it one long line):

  <font face="Arial" size="2">
   <a href="">Dr.Bob's Delphi 8 for .NET Clinic</a>
so you will always have a link to my Delphi 8 for .NET page from your Delphi welcome page (I couldn't think of a better place myself ;-)

Delphi 8 for .NET and IBM's DB2
The first Delphi 8 for .NET articles that I wrote were for the special web portal to support the cooperation between IBM's DB2 and Borland's RAD development environments (as announced last year) such as Delphi, C++Builder, Kylix, C#Builder and now also Delphi 8 for .NET.
When Delphi 8 for .NET was (almost) ready, this meant I could cover the new Borland Data Provider for ADO.NET, as a new way to connect to IBM's DB2 Universal Database (although it works the same if you use InterBase, Oracle, SQL Server / MSDE):

Bob and Allen at BorCon 2003 Allen Bauer's weblog
Another interesting resource that you absolutely need to check out is Allen Bauer's blog, with an RSS-feed as well.
Allen Bauer (Borland Delphi and C#Builder IDE Architect) has covered some very interesting and important topics, including the discussion surrounding .NET assemblies made with Delphi libraries or packages. The bottom line is: we should use a package to create a .NET assembly, and use a library only for cross-platform P/Invoke calls. And yes, that means that you also need to deploy the Borland.Delphi.dll assembly with your package assembly.

Brian Long's .NET papers
Brian Long has written a number of in-depth papers about .NET that could be very helpful (to say the least) for anyone using Delphi 8 for .NET on the .NET Framework. On the Borland Developer Network, you can find his paper about Object Destructors and Finalizers in .NET Using C# and Delphi for .NET.
Apart from that article, I can also recommend the following conference session papers from Brian:

Migrating Delphi apps to .NET with Delphi 8
I have written a white paper for Borland about migrating Borland Delphi (Win32) applications to the Microsoft .NET Framework with Delphi 8. This whitepaper discusses the migration of Delphi Win32 applications to the Microsoft .NET Framework using Delphi 8. The difference between Windows Forms and VCL for .NET is covered, as well as several example migrations from existing Delphi Win32 VCL applications to Delphi 8 native .NET applications.
There's also a Microsoft Win32 to Microsoft .NET Framework API Map that identifies the Microsoft .NET Framework version 1.0 or 1.1 APIs that provide similar functionality to Microsoft Win32 functions (one or more relevant .NET Framework APIs are shown for each Win32 function listed). This is especially helpful for Win32 developers who are creating applications or libraries based on the Microsoft .NET Framework, but anyone looking for a managed counterpart for a Win32 API.

Dr.Bob's Delphi 8 for .NET Clinic - One Day Training Events
Dr.Bob's Delphi Clinic Training Days in The Netherlands are intensive in-depth days that focus on one topic (per day), so you won't have to spend a week away from work. Each day comes with an in-depth courseware manual that contains detailed coverage of the specific topics.

This webpage © 2004-2010 by Bob Swart (aka Dr.Bob - All Rights Reserved.