From 16bb2d816544a75ca3d122e085d2dd72ea62dce5 Mon Sep 17 00:00:00 2001 From: Lorenz Cuno Klopfenstein Date: Tue, 6 May 2014 00:23:17 +0200 Subject: [PATCH] Comment. --- OnTopReplica/WindowsFormsExtensions.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/OnTopReplica/WindowsFormsExtensions.cs b/OnTopReplica/WindowsFormsExtensions.cs index 76c2399..a33e99c 100644 --- a/OnTopReplica/WindowsFormsExtensions.cs +++ b/OnTopReplica/WindowsFormsExtensions.cs @@ -57,6 +57,14 @@ namespace OnTopReplica { return bb.Contains(screenCoordinates); } + /// + /// Fixes the Windows Forms default font for a control and its nested controls. + /// + /// + /// Since Windows Forms defaults to Tahoma as the system font, this method is used + /// to fix the default font for a control and all its children controls, setting it + /// to the system message box font (Segoe on recent Windows releases). + /// public static void FixDefaultFont(this Control ctrl) { ctrl.Font = SystemFonts.MessageBoxFont; if (ctrl.Controls == null || ctrl.Controls.Count == 0)