A few days ago I blogged about a nasty bug in .NET 1.1 SP1, which made a nested groupbox control show up with garbled caption text (see here and here).
It took some hoops but Microsoft has fixed this now. It's a fix that's available through PSS, and has KB number article number 890828. The fix is still under review so it might be the KB article is not yet available, the fix though is available through PSS.
Yesterday I blogged about a horrible huge bug in the groupbox control for winforms in .NET 1.1 SP1 on a themed XP system (and that's pretty much all XP systems nowadays, since .NET 1.1 SP1 is a mandatory fix on windows update.). Today I'll show you a repro case. It's a silly form with just two nested groupboxes. On a themed XP machine you'll see that the inner groupbox' caption is garbled and has a horrible font.
I've tested this on more XP machines and they all showed the same results, with different themes (native XP ones). I'll try to contact PSS later today to get a fix for this AND to get this fixed publicly, because a private PSS-call-us-fix is useless, as users of applications by ISV's first have to call PSS to grab the special fix, which most of them won't do.
Update: It seems to occur on .NET 2.0 beta1 as well.
Full code: WinAppTest.zip
Form1.cs:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace WinAppTest
{
///
/// Summary description for Form1.
///
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.ComponentModel.Container components = null;
public Form1()
{
InitializeComponent();
}
#region Windows Form Designer generated code
///
/// Clean up any resources being used.
///
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.groupBox2);
this.groupBox1.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox1.Location = new System.Drawing.Point(21, 27);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(336, 174);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "groupBox1";
//
// groupBox2
//
this.groupBox2.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.groupBox2.Location = new System.Drawing.Point(81, 45);
this.groupBox2.Name = "groupBox2";
this.groupBox2.TabIndex = 0;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "groupBox2";
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(502, 278);
this.Controls.Add(this.groupBox1);
this.Name = "Form1";
this.Text = "Form1";
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
///
/// The main entry point for the application.
///
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.DoEvents();
Application.Run(new Form1());
}
}
}
I decided to upgrade to .NET 1.1 SP1. Then I ran one of my .NET winforms applications which has nested groupbox controls on a winform and FlatStyle set to System so they will be XP themed.
Then I saw that the nested groupbox controls had their captions in bold arial font and this made the caption to be too big and the text wasn't readable. See this screenshot:

As you can see: a butt-ugly caption which is also crippled. This is an existing app, so I didn't do anything. It worked perfectly on .NET 1.1. 
What to do? How can this be solved? I googled on this but all I find are some people having the same problem. Needless to say, I'm really pissed off by this. I hope there is an easy fix for this.
Update: It seems that when you add a panel and dock the groupbox inside the panel it works.So I now have to replace all nested group boxes with panels and dock the groupboxes inside these panels.
So Microsoft, how about FIXING this stupid bug A.S.A.P. ?
Via Scott Stewart I came across this article on Infoworld. Let me rehash the quote Scott posted as well:
The database community is also heading toward SOA. Plans are afoot to enable IBM DB2, Microsoft SQL Server 2005, Oracle 10g, Sybase (Profile, Products, Articles) ASE, and other platforms to participate actively in Web services-based SOA activities as first-class citizens -- even without the use of application servers. This will have profound implications for the design and management of widely distributed n-tiered applications because, in effect, hierarchical tiers will become horizontal peers.
Let me be blunt here: this whole SOA hype is pure marketing-poop. I mean: every developer on the planet knows that if you have several different elements in your application (gui, business logic, perhaps even a data-layer), element E provides services for element F and F is consumer of the services of element E. That's as old as what, client-server? Similar for library L which provides a set of functionality for application A which loads L at runtime. Offering a 'service' is nothing more than offering functionality (in any form you may think of) to others.
On a sunny day, some marketing department thought it would be great if the company's products would get a new 'unique' feature. What would be better than to re-hash the current features by giving them a new name? After days of brainstorming, consulting expensive advisors and visiting hand-reading guru's, they came up with... Service Oriented Architecture, better known as SOATM©®. SOATM©® would be the unique new feature of their products, which would give them an edge on the competition! Now, in the country were I live, The Netherlands, this acronym was already taken: "Seksueel Overdraagbare Aandoeningen", which roughly translates to: "Deceases transferable through sexual intercourse". Of course an unlucky coincidence.
Is this SOATM©®-thing (the English marketing version) really new? No, of course not. I mean, pulling data out of an RDBMS and into an external client program, how was that done a couple of years ago? That's right, calling into the service which was offered by the RDBMS through its API! However what do we see happening today? People who earn their living by selling hot air under the most weird acronyms, are yelling as hard as their lungs allow them to that something new is invented! SOATM©®! Don't be a slacker! Enable your applications for SOATM©® today! SOATM©® is the only real future! If you don't jump on the bandwagon today, you'll be sorry forever!
...(breath in.... breath out... 1 2 3 4 ... )
When I read an article like The Fallacy of the Data Layer by Rocky Lhotka, my eyes hurt, tears pop up and I can't stop shaking my head and whenever I read articles like that, one thought keeps coming back: are these SOATM©®-guys just doing this to get themselves more air-time at the next INETA sponsored speaker convention/PDC/TechEd/[your favorite fancy fair] ? I mean: it can't be just because they saw the light and can't stop themselves telling everybody how it really has to be done, how software really has to be developed, because all they do is re-hashing decade-old wisdom with newly invented acronyms!
Of course, the Infoworld article is written by a journalist, perfectly echoing the chimes coming from the marketing departments of their favorite sponsors. I can't blame him, he's not writing for developers who are standing knee-deep in the cold mud of the programmer-trenches, he's writing for managers, oh sorry, Enterprise VisionariesTM©®. However more and more, the developer world is talking about things which are just pure marketing inventions and which never should have left the manager's office, and SOATM©® is one of these things.
Years ago, the developer community embraced one of the predecessors of SOATM©®: N-tier developmentTM©®. Even today, large groups of developers are pulling their hair out of their bright heads and wonder "What exactly is n-tier development?" (if you don't believe me, check the www.asp.net forums). And rightfully so, because it's a vague term and almost everybody has a different opinion about it.
Years later, Web-servicesTM©® were introduced.
"Ah, a service which is a web."
"No."
"No?"
"No, a service using the web. (I think)"
"Oh, so a service not using the web, but normal TCP/IP isn't a web-service?"
"Hmm, good question. Ah I have it: a service written by the web-services logic build into VS.NET!"
"Ah, I can work with that. But... what about a remoted service, using SOAP and remoting, not web-services build into VS.NET" ?
"..."
Sounds familiar? Good. Now, to prevent this from happening again with SOATM©®, let's make a deal. Let us, developers across the globe, make a stand here: Enough with the marketing goo polluting our profession!.
Thanks for listening.
Today we released Template Studio, a full-featured IDE for creating / editing / testing templates for LLBLGen Pro. Template Studio is free for our customers and therefore one of the benefits if you decide to join the largest O/R mapper-family for .NET!
Below you'll find 3 screenshots. Clicking them will bring up the 1600x1200 version.
The main screen
The main screen shows you the multiple-document IDE with at the left a loaded LLBLGen Pro project. In the center you'll see multiple templates loaded, using TDL (our own template language) at the top and C# at the bottom. Furthermore you see an example of the intellisense build in for C# and VB.NET. At the left you see the viewer with the currently loaded templateset and all the templates defined in that templateset.
Compiler feedback
This screenshot shows you the compiler feedback. TDL templates are interpreted but C#/VB.NET templates are compiled into an assembly which is then executed to produce the output. As you can see the template at the bottom has an error, which is listed in the Application Output window at the bottom. Double-clicking that error will bring you to the C# code generated from the templates (which is not the output, but the actual code which is executed to produce the output) and the error found is visualized with a red line, similar to the ones we're all familiar with from VS.NET.
Run single task configuration screen
The code generator engine of LLBLGen Pro is build around tasks: a nested set of tasks is executed and each task can produce code or perform a code-generation supporting task like creating a directory, checking out code, compiling assemblies etc. etc. This powerful engine is directly integrated in Template Studio so testing a template is a breeze. This screenshot shows the configuration screen to run a single task. You can select one of your favorite tasks or setup a new one, for example based on one of the many pre-defined tasks in the list.
Template Studio is free for LLBLGen Pro customers and is created using Janus Systems' .NET Windows Forms controls v2.0
As they say in the part of Holland I come from: Folle Lok en Seine!
or in plain English: Happy New Year! :)