From 7d47e44cf551a25f8082109ed99a120bb5f2cd8b Mon Sep 17 00:00:00 2001 From: gpetrou Date: Wed, 13 Jun 2018 22:41:23 +0100 Subject: [PATCH] Make PreviewHandlerHost instead of PreviewHandlerControl inherit from Form --- .../SharpPreviewHandler/PreviewHandlerControl.cs | 10 +--------- .../SharpPreviewHandler/PreviewHandlerHost.cs | 4 +++- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/SharpShell/SharpShell/SharpPreviewHandler/PreviewHandlerControl.cs b/SharpShell/SharpShell/SharpPreviewHandler/PreviewHandlerControl.cs index 3e83e68f..6c850e32 100644 --- a/SharpShell/SharpShell/SharpPreviewHandler/PreviewHandlerControl.cs +++ b/SharpShell/SharpShell/SharpPreviewHandler/PreviewHandlerControl.cs @@ -6,16 +6,8 @@ namespace SharpShell.SharpPreviewHandler /// /// Base class for preview handler controls. /// - public class PreviewHandlerControl : Form + public class PreviewHandlerControl : UserControl { - /// - /// Initializes a new instance of the class. - /// - protected PreviewHandlerControl() - { - FormBorderStyle = FormBorderStyle.None; - } - /// /// Sets the color of the background, if possible, to coordinate with the windows /// color scheme. diff --git a/SharpShell/SharpShell/SharpPreviewHandler/PreviewHandlerHost.cs b/SharpShell/SharpShell/SharpPreviewHandler/PreviewHandlerHost.cs index b6b6f7a8..69bc53db 100644 --- a/SharpShell/SharpShell/SharpPreviewHandler/PreviewHandlerHost.cs +++ b/SharpShell/SharpShell/SharpPreviewHandler/PreviewHandlerHost.cs @@ -13,7 +13,7 @@ namespace SharpShell.SharpPreviewHandler /// The PreviewHandlerHost is the window created in the preview /// pane which will hold the derived preview handlers UI. /// - internal class PreviewHandlerHost : UserControl + internal class PreviewHandlerHost : Form { /// /// Initializes a new instance of the class. @@ -23,6 +23,8 @@ public PreviewHandlerHost() // Initialize the component. InitializeComponent(); + FormBorderStyle = FormBorderStyle.None; + // Invisible by default. Visible = false; }